forked from zethfps/kajdev_discord
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
24 lines (19 loc) · 744 Bytes
/
index.js
File metadata and controls
24 lines (19 loc) · 744 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
const {Client, GatewayIntentBits, Partials, Collection} = require("discord.js");
const {Guilds, GuildMembers, GuildMessages} = GatewayIntentBits;
const {User, Message, GuildMember, ThreadMember, Channel} = 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.json");
client.messages = require("./messages.json");
client
.login(process.env.token)
.then(() => {
loadCommands(client);
loadEvents(client);
})
.catch((err) => console.log(err));