17 lines
543 B
JavaScript
17 lines
543 B
JavaScript
const { clearQueue, getQueue } = require('../utils/queueManager');
|
|
|
|
module.exports = {
|
|
name: 'clear',
|
|
description: 'Clears the entire queue, except for the currently playing song',
|
|
execute(message) {
|
|
const guildId = message.guild.id;
|
|
const queue = getQueue(guildId);
|
|
|
|
if (queue.length === 0) {
|
|
return message.reply('The queue is already empty!');
|
|
}
|
|
|
|
clearQueue(guildId);
|
|
message.channel.send('The queue has been cleared, except for the currently playing song.');
|
|
}
|
|
}; |