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

42
dist/queue.js vendored
View File

@@ -156,16 +156,31 @@ var QueueCommands;
}
QueueCommands.queueCreate = queueCreate;
/**
* creates a queue from an interaction
* opens a queue
* @param interaction
* @throws errorMessage class if it cannot be left
*/
async function open(interaction) {
queueCreate(interaction);
}
QueueCommands.open = open;
/**
* closes a queue
* @param interaction
* @throws errorMessage class if it cannot be joined
*/
async function close(interaction) {
(0, util_1.memberIsModThrow)(interaction);
QUEUE.delete(interaction.channelId);
await interaction.reply('Queue has been reset');
}
QueueCommands.close = close;
/**
* gives info about the queue
* @param interaction
* @throws errorMessage class if it cannot be left
*/
async function queue(interaction) {
let teamsize = interaction.options.getInteger('teamsize');
if (teamsize) {
queueCreate(interaction);
return;
}
let info = getInfo(interaction);
let embed = new discord_js_1.MessageEmbed()
.setTitle('Active Queue')
@@ -176,18 +191,7 @@ var QueueCommands;
}
QueueCommands.queue = queue;
/**
* stops a queue from an interaction
* @param interaction
* @throws errorMessage class if it cannot be joined
*/
async function stop(interaction) {
(0, util_1.memberIsModThrow)(interaction);
QUEUE.delete(interaction.channelId);
await interaction.reply('Queue has been reset');
}
QueueCommands.stop = stop;
/**
* joins a queue from an interaction
* joins a queue
* @param interaction
* @throws errorMessage class if it cannot be readied
*/
@@ -202,7 +206,7 @@ var QueueCommands;
}
QueueCommands.join = join;
/**
* leaves a queue from an interaction
* leaves a queue
* @param interaction
* @throws errorMessage class if it cannot be reset
*/