renamed/moved commands

This commit is contained in:
2022-02-11 13:18:17 -06:00
parent e444167f07
commit 3ed56b7927
6 changed files with 115 additions and 69 deletions

32
dist/index.js vendored
View File

@@ -45,16 +45,28 @@ CLIENT.on('interactionCreate', async (interaction) => {
if (!interaction.isCommand())
return;
try {
if (interaction.commandName === 'queue')
await queue_1.QueueCommands.queue(interaction);
else if (interaction.commandName === 'join')
await queue_1.QueueCommands.join(interaction);
else if (interaction.commandName === 'leave')
await queue_1.QueueCommands.leave(interaction);
else if (interaction.commandName === 'stop')
await queue_1.QueueCommands.stop(interaction);
else if (interaction.commandName === 'player')
await (0, api_1.getPlayerInteraction)(interaction);
switch (interaction.commandName) {
//mod commands
case 'open':
await queue_1.QueueCommands.open(interaction);
break;
case 'close':
await queue_1.QueueCommands.close(interaction);
break;
//general commands
case 'queue':
await queue_1.QueueCommands.queue(interaction);
break;
case 'join':
await queue_1.QueueCommands.join(interaction);
break;
case 'leave':
await queue_1.QueueCommands.leave(interaction);
break;
case 'player':
await (0, api_1.getPlayerInteraction)(interaction);
break;
}
}
catch (e) {
if (e instanceof util_1.errorMessage) {