-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
53 lines (45 loc) · 1.4 KB
/
index.js
File metadata and controls
53 lines (45 loc) · 1.4 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
42
43
44
45
46
47
48
49
50
51
52
53
const Discord = require('discord.js-selfbot-v13');
const config = require("./config.js");
const CommandHandler = require("./Handlers/CommandHandler");
const EventHandler = require("./Handlers/EventHandler.js");
const WebhookManager = require("./Handlers/WebhookManager");
const MessageManager = require("./Handlers/MessageManager");
const ServerManager = require("./Handlers/ServerHandler");
const Extenders = require("./Util/BasicExtenders");
class Client extends Discord.Client {
constructor() {
super({ checkUpdate: false });
this.Config = config;
this.PipelineCache = {
Guilds: [],
Roles: [],
Channels: [],
Messages: [],
Components: new Map()
}
this.WebhookManager = WebhookManager;
this.MessageManager = MessageManager;
this.ServerManager = ServerManager;
this.UserCommands = new Discord.Collection();
this.Initialize();
this.Start();
}
async Initialize() {
await Extenders();
await CommandHandler(this);
await EventHandler(this);
}
async Start() {
await this.login(config.altToken);
}
}
new Client();
process.on("unhandledRejection", (err) => {
console.log(err, 'error');
});
process.on('rejectionHandled', (err) => {
console.log(err, "error")
})
process.on('uncaughtException', (err) => {
console.log(err, "error")
})