✨ Update (v6.0.0)
This commit is contained in:
@@ -1,19 +1,16 @@
|
||||
module.exports = {
|
||||
name: 'stop',
|
||||
aliases: ['dc'],
|
||||
category: 'Music',
|
||||
utilisation: '{prefix}stop',
|
||||
voiceChannel: true,
|
||||
|
||||
execute(client, message) {
|
||||
if (!message.member.voice.channel) return message.channel.send(`${client.emotes.error} - You're not in a voice channel !`);
|
||||
const queue = player.getQueue(message.guild.id);
|
||||
|
||||
if (message.guild.me.voice.channel && message.member.voice.channel.id !== message.guild.me.voice.channel.id) return message.channel.send(`${client.emotes.error} - You are not in the same voice channel !`);
|
||||
if (!queue || !queue.playing) return message.channel.send(`No music currently playing ${message.author}... try again ? ❌`);
|
||||
|
||||
if (!client.player.getQueue(message)) return message.channel.send(`${client.emotes.error} - No music currently playing !`);
|
||||
queue.destroy();
|
||||
|
||||
client.player.setRepeatMode(message, false);
|
||||
const success = client.player.stop(message);
|
||||
|
||||
if (success) message.channel.send(`${client.emotes.success} - Music **stopped** into this server !`);
|
||||
message.channel.send(`Music stopped into this server, see you next time ✅`);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user