2021-06-12 12:53:51 +02:00
|
|
|
module.exports = {
|
|
|
|
name: "pause",
|
2021-07-13 05:17:39 +02:00
|
|
|
aliases: ["ps"],
|
|
|
|
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", "pause", 34);
|
|
|
|
const { channel } = message.member.voice;
|
|
|
|
if (!channel) return client.err(message, "Music", "pause", 35);
|
|
|
|
if (channel.id !== player.voiceChannel)
|
|
|
|
return client.err(message, "Music", "pause", 55);
|
2021-09-06 12:38:25 +02:00
|
|
|
if (player.paused) return message.reply("The player is already paused");
|
2021-07-13 05:17:39 +02:00
|
|
|
player.pause(true);
|
2021-09-06 12:38:25 +02:00
|
|
|
return message.reply("The player is paused");
|
2021-06-12 12:53:51 +02:00
|
|
|
},
|
|
|
|
};
|