This repository was archived by the owner on Mar 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbot.js
More file actions
46 lines (32 loc) · 1.18 KB
/
bot.js
File metadata and controls
46 lines (32 loc) · 1.18 KB
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
40
41
const { Collection } = require("discord.js");
const client = require("./Clients/DiscordJS");
const { readdirSync } = require("fs");
const config = require("./config");
const { EmbedBuilder } = require("discord.js")
require("dotenv").config();
client.messageCmd = new Collection();
client.slashCmd = new Collection();
client.events = new Collection();
require("./Handler/Events")(client);
require("./db.js")
require("./Handler/Message")(client);
require("./Handler/Slash")(client);
client.cooldowns = new Collection();
client.handleEvents();
client.login();
process.on("unhandledRejection", (err, promise) => {
// Needed
console.error("[ANTICRASH] :: [unhandledRejection]");
console.log(promise, err);
console.error("[ANTICRASH] :: [unhandledRejection] END");
});
process.on("uncaughtException", (err, origin) => {
console.error("[ANTICRASH] :: [uncaughtException]");
console.log(err, origin);
console.error("[ANTICRASH] :: [uncaughtException] END");
});
process.on("uncaughtExceptionMonitor", (err, origin) => {
console.error("[ANTICRASH] :: [uncaughtExceptionMonitor]");
console.log(err, origin);
console.error("[ANTICRASH] :: [uncaughtExceptionMonitor] END");
});