renamed/moved commands
This commit is contained in:
52
src/queue.ts
52
src/queue.ts
@@ -178,19 +178,37 @@ export namespace QueueCommands {
|
||||
}
|
||||
|
||||
/**
|
||||
* creates a queue from an interaction
|
||||
* opens a queue
|
||||
* @param interaction
|
||||
* @throws errorMessage class if it cannot be left
|
||||
*/
|
||||
export async function open(interaction: CommandInteraction) {
|
||||
|
||||
queueCreate(interaction);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* closes a queue
|
||||
* @param interaction
|
||||
* @throws errorMessage class if it cannot be joined
|
||||
*/
|
||||
export async function close(interaction: CommandInteraction) {
|
||||
memberIsModThrow(interaction);
|
||||
|
||||
QUEUE.delete(interaction.channelId);
|
||||
|
||||
await interaction.reply('Queue has been reset');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* gives info about the queue
|
||||
* @param interaction
|
||||
* @throws errorMessage class if it cannot be left
|
||||
*/
|
||||
export async function queue(interaction: CommandInteraction) {
|
||||
|
||||
let teamsize = interaction.options.getInteger('teamsize');
|
||||
|
||||
if (teamsize) {
|
||||
queueCreate(interaction);
|
||||
return;
|
||||
}
|
||||
|
||||
let info = getInfo(interaction);
|
||||
|
||||
let embed = new MessageEmbed()
|
||||
@@ -204,21 +222,7 @@ export namespace QueueCommands {
|
||||
}
|
||||
|
||||
/**
|
||||
* stops a queue from an interaction
|
||||
* @param interaction
|
||||
* @throws errorMessage class if it cannot be joined
|
||||
*/
|
||||
export async function stop(interaction: CommandInteraction) {
|
||||
memberIsModThrow(interaction);
|
||||
|
||||
QUEUE.delete(interaction.channelId);
|
||||
|
||||
await interaction.reply('Queue has been reset');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* joins a queue from an interaction
|
||||
* joins a queue
|
||||
* @param interaction
|
||||
* @throws errorMessage class if it cannot be readied
|
||||
*/
|
||||
@@ -240,7 +244,7 @@ export namespace QueueCommands {
|
||||
}
|
||||
|
||||
/**
|
||||
* leaves a queue from an interaction
|
||||
* leaves a queue
|
||||
* @param interaction
|
||||
* @throws errorMessage class if it cannot be reset
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user