mirror of
https://github.com/aydenjahola/discord-multipurpose-bot.git
synced 2025-09-21 06:41:35 +01:00
19 lines
610 B
JavaScript
19 lines
610 B
JavaScript
const { SlashCommandBuilder } = require("discord.js");
|
|
|
|
module.exports = {
|
|
data: new SlashCommandBuilder()
|
|
.setName("stop")
|
|
.setDescription("Stops the music and clears the queue."),
|
|
category: "Music",
|
|
|
|
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.");
|
|
}
|
|
},
|
|
};
|