-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.ts
29 lines (23 loc) · 867 Bytes
/
index.ts
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
import { Intents } from 'discord.js';
import Client from './modules/Client';
import handleCommands from './modules/handlers/commandHandler';
import handleEvents from './modules/handlers/eventHandler';
import { config } from 'dotenv';
config();
const intents = [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MESSAGE_REACTIONS, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_VOICE_STATES, Intents.FLAGS.DIRECT_MESSAGES],
bot = new Client('.', { intents: intents });
(async function() {
await handleEvents(bot, {
absolutePath: `./events`,
path: 'events',
name: 'KRGenie'
});
bot.once('ready', async() => {
await handleCommands(bot, {
absolutePath: `./_cmd`,
path: '_cmd',
name: 'KRGenie'
});
})
bot.login(process.env.TOKEN);
})();