From 2a079c73cae0bfe3eac7a4fdceb7a3c0fafbfb83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Sat, 8 Sep 2018 23:09:33 +0200 Subject: [PATCH] DOSENT WORK TO FIX --- commands/fun/music.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/commands/fun/music.js b/commands/fun/music.js index 60a5fd12..e3422c0f 100644 --- a/commands/fun/music.js +++ b/commands/fun/music.js @@ -6,7 +6,7 @@ module.exports = class MusicCommand extends Command { name: 'music', group: 'fun', memberName: 'music', - description: 'Play youtube link in vocal', + description: 'Play youtube link in vocal ( DOSENT WORK RN TRYING TO FIX IT )', args: [ { key: 'ytblink', @@ -19,10 +19,12 @@ module.exports = class MusicCommand extends Command { run(message, { ytblink }) { const { voiceChannel } = message.member; + if (!voiceChannel) { return message.reply('please join a voice channel first!'); - } - + + } else + if (ytblink == 'stop') { voiceChannel.leave() } else @@ -33,6 +35,6 @@ module.exports = class MusicCommand extends Command { dispatcher.on('end', () => voiceChannel.leave()); }); + } - } -}; \ No newline at end of file + } \ No newline at end of file