mirror of
https://github.com/aydenjahola/discord-multipurpose-bot.git
synced 2025-09-21 06:41:35 +01:00
28 lines
708 B
JavaScript
28 lines
708 B
JavaScript
const { SlashCommandBuilder } = require("discord.js");
|
|
|
|
module.exports = {
|
|
data: new SlashCommandBuilder()
|
|
.setName("resume")
|
|
.setDescription("Resumes the paused song"),
|
|
category: "Music",
|
|
|
|
async execute(interaction, client) {
|
|
const queue = client.distube.getQueue(interaction.guildId);
|
|
|
|
if (!queue) {
|
|
return interaction.reply("❌ There is no music playing!");
|
|
}
|
|
|
|
if (!queue.paused) {
|
|
return interaction.reply("▶️ Music is not paused!");
|
|
}
|
|
|
|
try {
|
|
await queue.resume();
|
|
interaction.reply("▶️ Resumed the music!");
|
|
} catch (error) {
|
|
console.error(error);
|
|
interaction.reply("❌ Failed to resume the music.");
|
|
}
|
|
},
|
|
};
|