nyx/commands/Music/resume.js

18 lines
689 B
JavaScript
Raw Normal View History

2021-06-12 12:53:51 +02:00
module.exports = {
name: "resume",
2021-07-13 05:17:39 +02:00
description: "Pauses the current playing music",
2021-06-12 12:53:51 +02:00
category: "Music",
run: async (client, message, args) => {
2021-07-13 05:17:39 +02:00
const player = message.client.manager.get(message.guild.id);
if (!player) return client.err(message, "Music", "resume", 34);
const { channel } = message.member.voice;
if (!channel) return client.err(message, "Music", "resume", 35);
if (channel.id !== player.voiceChannel)
return client.err(message, "Music", "resume", 55);
if (player.paused == false)
return message.inlineReply("The player is already playing");
player.pause(false);
return message.inlineReply("The player is resumed");
2021-06-12 12:53:51 +02:00
},
};