queue command init

This commit is contained in:
2022-01-27 17:06:41 -06:00
parent a70be5599a
commit c2a80fc56c
4 changed files with 10 additions and 8 deletions

View File

@@ -2,6 +2,7 @@
import { Client, Intents } from 'discord.js';
import * as fs from 'fs';
import { registerCommands } from './discord';
import { createQueue } from './queue';
const CLIENT = new Client({ intents: [Intents.FLAGS.GUILDS] });
if (!fs.existsSync('./token')) {
@@ -20,9 +21,8 @@ CLIENT.on('ready', client => {
CLIENT.on('interactionCreate', async interaction => {
if (!interaction.isCommand()) return;
if (interaction.commandName === 'queue') {
await interaction.reply('Pong!');
}
if (interaction.commandName === 'queue')
createQueue(interaction);
});
CLIENT.login(TOKEN);