-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
41 lines (34 loc) · 958 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
30
31
32
33
34
35
36
37
38
39
40
41
const {
Client,
GatewayIntentBits,
Partials,
Collection
} = require('discord.js');
const config = require("./config.json");
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildIntegrations,
GatewayIntentBits.GuildMembers
],
partials: [
Partials.Message,
Partials.Channel,
Partials.GuildMember,
Partials.Reaction,
Partials.GuildScheduledEvent,
Partials.User,
Partials.ThreadMember,
]
});
module.exports = client;
client.commands = new Collection();
client.slashCommands = new Collection();
client.on('ready', async () => {
require("./handler")(client);
const readyEvent = require("./events/client/ready");
await readyEvent.execute(client);
})
client.login(config.token)