renamed/moved commands
This commit is contained in:
42
dist/queue.js
vendored
42
dist/queue.js
vendored
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user