diff options
-rw-r--r-- | music.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -5,6 +5,11 @@ const youtubeSearchApi = require("youtube-search-api") module.exports = { play: { func: async (msg, urlArr) => { + const channel = msg.member.voice.channel + + if (! channel) + return msg.reply("Join a voice channel you fucking moron") + let url = urlArr.join(" ") try { @@ -14,11 +19,6 @@ module.exports = { msg.reply("Playing this: " + url) } - const channel = msg.member.voice.channel - - if (! channel) - return msg.reply("Join a voice channel you fucking moron") - const conn = voice.joinVoiceChannel({ channelId: channel.id, guildId: channel.guild.id, |