link commands
This commit is contained in:
15
src/index.ts
15
src/index.ts
@@ -1,8 +1,9 @@
|
||||
|
||||
import { Client, Intents } from 'discord.js';
|
||||
import * as fs from 'fs';
|
||||
import { getPlayerInteraction } from './api';
|
||||
import { registerCommands } from './discord';
|
||||
import { createQueue } from './queue';
|
||||
import { createQueue, joinQueue, queueInfo } from './queue';
|
||||
const CLIENT = new Client({ intents: [Intents.FLAGS.GUILDS] });
|
||||
|
||||
if (!fs.existsSync('./token')) {
|
||||
@@ -22,7 +23,15 @@ CLIENT.on('interactionCreate', async interaction => {
|
||||
if (!interaction.isCommand()) return;
|
||||
|
||||
if (interaction.commandName === 'queue')
|
||||
createQueue(interaction);
|
||||
await createQueue(interaction);
|
||||
else if (interaction.commandName === 'join')
|
||||
await joinQueue(interaction);
|
||||
//else if (interaction.commandName === 'ready')
|
||||
// await readyQueue(interaction);
|
||||
else if (interaction.commandName === 'queueinfo')
|
||||
await queueInfo(interaction);
|
||||
else if (interaction.commandName === 'elo')
|
||||
await getPlayerInteraction(interaction);
|
||||
});
|
||||
|
||||
CLIENT.login(TOKEN);
|
||||
CLIENT.login(TOKEN);
|
||||
|
||||
Reference in New Issue
Block a user