-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
26 lines (21 loc) · 771 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
const { Client, Collection, GatewayIntentBits } = require("discord.js");
const client = new Client({
shards: "auto",
allowedMentions: {
parse: ["roles", "users"],
repliedUser: false
},
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
],
});
client.config = require('./settings/config.js');
client.embed_color = client.config.embed_color;
client.owner = client.config.owner
if (!client.token) client.token = client.config.token;
process.on('unhandledRejection', err => console.log(err));
process.on('uncaughtException', err => console.log(err));
["commands"].forEach(x => client[x] = new Collection());
["command", "event"].forEach(x => require(`./handlers/${x}`)(client));
client.login(client.token);