-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
27 lines (23 loc) · 851 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
const { Client, GatewayIntentBits, Partials, Collection } = require('discord.js');
const config = require('./configs/config.json')
const fs = require('fs')
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.MessageContent
],
partials: [Partials.Channel, Partials.Message, Partials.User, Partials.GuildMember, Partials.Reaction]
});
client.commands = new Collection()
client.aliases = new Collection()
client.prefix = config.prefix
module.exports = client;
client.categories = fs.readdirSync("./commands/");
["command", "events"].forEach(handler => {
require(`./handlers/${handler}`)(client);
});
client.login(config.token)