-
-
Notifications
You must be signed in to change notification settings - Fork 98
/
index.js
41 lines (31 loc) · 1.15 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
require("dotenv").config();
const PogyClient = require("./Pogy");
const config = require("./config.json");
const logger = require("./src/utils/logger");
const Pogy = new PogyClient(config);
const color = require("./src/data/colors");
Pogy.color = color;
const emoji = require("./src/data/emoji");
Pogy.emoji = emoji;
let client = Pogy;
const jointocreate = require("./src/structures/jointocreate");
jointocreate(client);
Pogy.react = new Map();
Pogy.fetchforguild = new Map();
Pogy.start(process.env.TOKEN);
process.on("unhandledRejection", (reason, p) => {
logger.info(`[unhandledRejection] ${reason.message}`, { label: "ERROR" });
console.log(reason, p);
});
process.on("uncaughtException", (err, origin) => {
logger.info(`[uncaughtException] ${err.message}`, { label: "ERROR" });
console.log(err, origin);
});
process.on("uncaughtExceptionMonitor", (err, origin) => {
logger.info(`[uncaughtExceptionMonitor] ${err.message}`, { label: "ERROR" });
console.log(err, origin);
});
process.on("multipleResolves", (type, promise, reason) => {
logger.info(`[multipleResolves] MULTIPLE RESOLVES`, { label: "ERROR" });
console.log(type, promise, reason);
});