nyx/commands/Music/resume.js
night0721 bc346138dd Bot
2021-06-12 18:53:51 +08:00

28 lines
894 B
JavaScript

const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "resume",
description: "To resume the paused music",
aliases: ["continue"],
category: "Music",
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const serverQueue = message.client.queue.get(message.guild.id);
if (serverQueue && !serverQueue.playing) {
serverQueue.playing = true;
serverQueue.connection.dispatcher.resume();
let xd = new MessageEmbed()
.setDescription(`▶ Resumed the music for ${message.author.username}`)
.setColor("YELLOW")
.setAuthor(
"Music has been resumed.",
"https://i.imgur.com/qHPXWxN.gif"
);
return message.channel.send(xd);
}
return client.err(message, "Music", "resume", 34);
},
};