-
Notifications
You must be signed in to change notification settings - Fork 1
/
appReviewIndex.js
29 lines (21 loc) · 974 Bytes
/
appReviewIndex.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
import { default as config } from './config.js';
import * as commands from './commands/index.js';
import { handleApplication } from './lib/index.js'
import { Client, Intents } from 'discord.js'
const client = new Client({
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MEMBERS,
Intents.FLAGS.DIRECT_MESSAGE_REACTIONS, Intents.FLAGS.GUILD_MESSAGE_REACTIONS],
partials: ['MESSAGE', 'CHANNEL', 'REACTION']
});
// Register an event so that when the bot is ready, it will log a messsage to the terminal
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
})
client.on('interactionCreate', async interaction => {
if (!interaction.isCommand()) return;
if (interaction.commandName === 'review-applications') {
await commands['reviewApplications'](interaction)
}
});
// client.login logs the bot in and sets it up for use. You'll enter your token here.
client.login(config.discordToken);