This commit is contained in:
Loïc Bersier 2018-09-08 00:36:47 +02:00
parent 9309c76b9d
commit 64477560fd

View file

@ -20,9 +20,9 @@ module.exports = class MusicCommand extends Command {
run(message, { ytblink }) { run(message, { ytblink }) {
const { voiceChannel } = message.member; const { voiceChannel } = message.member;
if (ytblink == 'stop') { if (!voiceChannel && ytblink == 'stop') {
voiceChannel.leave() voiceChannel.leave()
} else } else
if (!voiceChannel) { if (!voiceChannel) {
return message.reply('please join a voice channel first!'); return message.reply('please join a voice channel first!');
} }