From abd09f6b0c8b02761088dd94a63760b619db91c6 Mon Sep 17 00:00:00 2001 From: Matte <51192395+MatteZ02@users.noreply.github.com> Date: Sun, 20 Oct 2019 21:23:35 +0300 Subject: [PATCH] Update playlist.js --- commands/playlist.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/playlist.js b/commands/playlist.js index 403ee3be..8954b498 100644 --- a/commands/playlist.js +++ b/commands/playlist.js @@ -17,6 +17,7 @@ module.exports = { if (client.global.db.guilds[message.guild.id].premium) { if (args[1] === 'play') { const voiceChannel = message.member.voiceChannel; + if (!voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in a voice channel to play music!'); const permissions = voiceChannel.permissionsFor(message.client.user); if (!permissions.has('CONNECT')) { return message.channel.send(':x: I cannot connect to your voice channel, make sure I have the proper permissions!');