-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
28 lines (24 loc) · 1017 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
console.log("Child process")
const {exec} = require("child_process");
const {copyFile,existsSync} = require("fs");
// const pm2process = exec("npx pm2 start all");
const Discord = require("discord.js")
const webh = new Discord.WebhookClient({id: '946840351606452234', token: 'StbYgJx19dT9MIXQnmE_DzmdtmiE8U3_gBRkPp-w7Ae_iSMr5WHADytQRD-jlZOe5uxA'})
require("./server/index.js")
require("./bot.js")
process.on('unhandledRejection', (reason, p) => {
console.log(' 🚩 [antiCrash] >> Unhandled Rejection/Catch');
console.log(reason, p);
});
process.on("uncaughtException", (err, origin) => {
console.log(' 🚩 [antiCrash] >> Uncaught Exception/Catch');
console.log(err, origin);
})
process.on('uncaughtExceptionMonitor', (err, origin) => {
console.log(' 🚩 [antiCrash] >> Uncaught Exception/Catch (MONITOR)');
console.log(err, origin);
});
process.on('multipleResolves', (type, promise, reason) => {
console.log(' 🚩 [antiCrash] >> Multiple Resolves');
console.log(type, promise, reason);
})