-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
38 lines (31 loc) · 803 Bytes
/
index.js
File metadata and controls
38 lines (31 loc) · 803 Bytes
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
const {
Client,
Collection
} = require('discord.js');
const {
TOKEN,
PREFIX,
NAME,
TYPE,
STATUS
} = require('./config.json');
const fs = require('fs');
const color = require('./Utility/etc/colors.js')
const client = new Client({
intents: 32767
});
client.commands = new Collection();
client.aliases = new Collection();
client.categories = fs.readdirSync("./Commands");
client.events = new Collection();
client.slashCommands = new Collection();
client.config = require('./config.json');
module.exports = client;
["Command", "Event", "Slash"].forEach(handler =>
{require(`./Structures/${handler}`)(client);
});
process.on('unhandledRejection', err => {
console.log(`[ERROR] Unhandled promise rejection: $ {err.message}.`);
console.log(err);
});
client.login(TOKEN);