Pause resume loop
This commit is contained in:
17
commands/loop.js
Normal file
17
commands/loop.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const musicQueue = require('../musicQueue');
|
||||
|
||||
async function loopCommand(interaction) {
|
||||
await interaction.deferReply();
|
||||
|
||||
const looping = interaction.options.getBoolean('looping');
|
||||
|
||||
musicQueue.setLooping(interaction.guild.id, looping);
|
||||
|
||||
if (looping) {
|
||||
interaction.followUp('Enabled looping for the current queue.');
|
||||
} else {
|
||||
interaction.followUp('Disabled looping for the current queue.');
|
||||
}
|
||||
}
|
||||
|
||||
module.exports.loopCommand = loopCommand;
|
||||
Reference in New Issue
Block a user