cleaned up queue file
This commit is contained in:
36
dist/index.js
vendored
36
dist/index.js
vendored
@@ -48,17 +48,29 @@ CLIENT.on('ready', client => {
|
||||
CLIENT.on('interactionCreate', (interaction) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
if (!interaction.isCommand())
|
||||
return;
|
||||
if (interaction.commandName === 'queue')
|
||||
yield (0, queue_1.createQueue)(interaction);
|
||||
else if (interaction.commandName === 'join')
|
||||
yield (0, queue_1.joinQueue)(interaction);
|
||||
else if (interaction.commandName === 'leave')
|
||||
yield (0, queue_1.leaveQueue)(interaction);
|
||||
else if (interaction.commandName === 'ready')
|
||||
yield (0, queue_1.readyQueue)(interaction);
|
||||
else if (interaction.commandName === 'queueinfo')
|
||||
yield (0, queue_1.queueInfo)(interaction);
|
||||
else if (interaction.commandName === 'elo')
|
||||
yield (0, api_1.getPlayerInteraction)(interaction);
|
||||
try {
|
||||
if (interaction.commandName === 'queue')
|
||||
yield (0, queue_1.createQueue)(interaction);
|
||||
else if (interaction.commandName === 'join')
|
||||
yield (0, queue_1.joinQueue)(interaction);
|
||||
else if (interaction.commandName === 'leave')
|
||||
yield (0, queue_1.leaveQueue)(interaction);
|
||||
else if (interaction.commandName === 'ready')
|
||||
yield (0, queue_1.readyQueue)(interaction);
|
||||
else if (interaction.commandName === 'queueinfo')
|
||||
yield (0, queue_1.queueInfo)(interaction);
|
||||
else if (interaction.commandName === 'elo')
|
||||
yield (0, api_1.getPlayerInteraction)(interaction);
|
||||
}
|
||||
catch (e) {
|
||||
if (typeof e === 'string') {
|
||||
if (interaction.deferred || interaction.replied)
|
||||
interaction.editReply(e);
|
||||
else
|
||||
interaction.reply(e);
|
||||
}
|
||||
else
|
||||
console.error(e);
|
||||
}
|
||||
}));
|
||||
CLIENT.login(TOKEN);
|
||||
|
||||
Reference in New Issue
Block a user