-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
27 lines (24 loc) · 787 Bytes
/
index.js
File metadata and controls
27 lines (24 loc) · 787 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
const {
Client,
GatewayIntentBits,
Partials,
Collection,
} = require("discord.js");
const { Rest } = require("@discordjs/rest");
const { Guilds, GuildMembers, GuildMessages } = GatewayIntentBits;
const { User, Message, GuildMember, ThreadMember } = Partials;
const { loadEvents } = require("./handlers/EventHandler");
const { loadCommands } = require("./handlers/commandHandler");
const client = new Client({
intents: [Guilds, GuildMembers, GuildMessages],
partials: [User, Message, GuildMember, ThreadMember],
});
client.commands = new Collection();
client.config = require("./config/config.json");
client
.login(client.config.TOKEN)
.then(() => {
loadEvents(client);
loadCommands(client);
})
.catch((err) => console.log(err));