diff --git a/commands/fun/music.js b/commands/fun/music.js index 42dfa0e2..73effbe5 100644 --- a/commands/fun/music.js +++ b/commands/fun/music.js @@ -20,13 +20,13 @@ module.exports = class MusicCommand extends Command { run(message, { ytblink }) { const { voiceChannel } = message.member; + if (ytblink == 'stop') { + voiceChannel.leave() + } else if (!voiceChannel) { return message.reply('please join a voice channel first!'); } - if (ytblink == 'stop') { - voiceChannel.leave() - } else voiceChannel.join().then(connection => { const stream = ytdl(ytblink, { filter: 'audioonly' }); const dispatcher = connection.playStream(stream);