-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
48 lines (43 loc) · 1.22 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
40
41
42
43
44
45
46
47
48
const {
Client,
Collection,
Partials,
GatewayIntentBits,
} = require("discord.js");
const config = require("./config/config.json");
const colors = require("colors/safe");
const send = require("./utils/src/send");
const error = require("./utils/src/error");
const client = new Client({
intents: [
GatewayIntentBits.GuildMembers,
GatewayIntentBits.MessageContent,
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildInvites,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildEmojisAndStickers,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.DirectMessageReactions,
],
partials: [
Partials.Channel,
Partials.GuildMember,
Partials.Message,
Partials.User,
Partials.Reaction,
],
});
global.client = client;
global.config = config;
global.color = colors;
global.send = send;
global.error = error;
global.queues = new Collection();
client.commands = new Collection();
require("./utils/handlers/CommandsHandler")(client);
require("./utils/handlers/EventsHandler")(client);
require("./utils/handlers/antiCrash")(client);
require("./database/connection/mongodb");
client.login(config.token);