2024-08-17 15:16:17 -04:00
|
|
|
const { clearQueue, getQueue } = require('../utils/queueManager');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
name: 'clear',
|
2024-08-17 15:24:09 -04:00
|
|
|
description: 'Clears the entire queue, except for the currently playing song',
|
2024-08-17 15:16:17 -04:00
|
|
|
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.');
|
|
|
|
}
|
|
|
|
};
|