mirror of
https://github.com/aydenjahola/discord-multipurpose-bot.git
synced 2025-09-21 14:51:34 +01:00
17 lines
588 B
JavaScript
17 lines
588 B
JavaScript
const { SlashCommandBuilder } = require("discord.js");
|
|
|
|
module.exports = {
|
|
data: new SlashCommandBuilder()
|
|
.setName("stop")
|
|
.setDescription("Stops the music and clears the queue."),
|
|
async execute(interaction, client) {
|
|
const queue = client.distube.getQueue(interaction.guildId);
|
|
if (!queue) return interaction.reply("❌ No music is playing!");
|
|
try {
|
|
await client.distube.stop(interaction.guildId);
|
|
interaction.reply("🛑 Stopped the player and cleared the queue!");
|
|
} catch (error) {
|
|
interaction.reply("❌ Failed to stop.");
|
|
}
|
|
},
|
|
};
|