added cancel command
This commit is contained in:
@@ -3,7 +3,7 @@ import { Client, Intents } from 'discord.js';
|
||||
import * as fs from 'fs';
|
||||
import { getPlayerInteraction } from './api';
|
||||
import { registerCommands } from './discord';
|
||||
import { createQueue, joinQueue, leaveQueue, queueInfo, readyQueue } from './queue';
|
||||
import { cancelQueue, createQueue, joinQueue, leaveQueue, queueInfo, readyQueue } from './queue';
|
||||
const CLIENT = new Client({ intents: [Intents.FLAGS.GUILDS] });
|
||||
|
||||
//init logs with a timestamp
|
||||
@@ -37,6 +37,8 @@ CLIENT.on('interactionCreate', async interaction => {
|
||||
await leaveQueue(interaction);
|
||||
else if (interaction.commandName === 'ready')
|
||||
await readyQueue(interaction);
|
||||
else if (interaction.commandName === 'cancel')
|
||||
await cancelQueue(interaction);
|
||||
else if (interaction.commandName === 'queueinfo')
|
||||
await queueInfo(interaction);
|
||||
else if (interaction.commandName === 'elo')
|
||||
|
||||
Reference in New Issue
Block a user