-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
29 lines (24 loc) · 952 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
29
const { Client, GatewayIntentBits, Partials, Collection } = require('discord.js');
require(`colors`)
const client = new Client({
allowedMentions: {
parse: ["roles", "users", "everyone"],
repliedUser: false,
},
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.MessageContent
],
partials: [Partials.Channel, Partials.Message, Partials.User, Partials.GuildMember, Partials.Reaction]
});
[`variables`, `extraEvents`, `checker`, `mongo_db`, `server`, `command`, 'slashCommand', 'events', `antiCrash`].forEach((handler) => {
const file = require(`./src/handlers/${handler}`)
if (file.execute) file.execute(client);
else file(client);
});
client.login(client.config.TOKEN).catch((error) => { console.log((error.message).bold.red) });
module.exports = client;