@getsolara/solara.voice
Version:
Optional voice functionality for @getsolara/solara.js using @discordjs/voice
17 lines • 788 B
JavaScript
module.exports = {
name: "$voiceQueueClear",
description: "Clears the song queue.",
takesBrackets: false,
execute: async (context, args) => {
if (context.client.voiceInitialized === false) {
return "[Error: $voiceQueueClear requires voice features to be enabled. Ensure @getsolara/solara.voice is installed and configured correctly.]";
}
if (!context.guild) return "[Error: $voiceQueueClear can only be used in a server.]";
const queue = context.client.solaraVoiceQueues?.get(context.guild.id);
if (queue) {
queue.length = 0;
return "Queue cleared.";
}
return "[Bot is not connected or queue system not initialized for this server for $voiceQueueClear.]";
}
};