From d0d6841353acf5333d6e462af3ea58460274371b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Fri, 13 Mar 2020 20:55:50 +0200 Subject: [PATCH] Fixed stop & volume commands by modifying things in struct/check.js --- struct/check.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/struct/check.js b/struct/check.js index 6e3e04e..dc634cf 100644 --- a/struct/check.js +++ b/struct/check.js @@ -2,8 +2,14 @@ module.exports = function (client, msg, command) { let message = {}; const radio = client.radio.get(msg.guild.id); const permissions = msg.channel.permissionsFor(msg.author); - if (!radio || !radio.playing) return msg.channel.send(client.messages.notPlaying); - if (msg.member.voice.channel !== radio.voiceChannel) return msg.channel.send(client.messages.wrongVoiceChannel); + if (!radio || !radio.playing){ + msg.channel.send(client.messages.notPlaying); + return false; + } + if (msg.member.voice.channel !== radio.voiceChannel){ + msg.channel.send(client.messages.wrongVoiceChannel); + return false; + } if (!permissions.has(command.permission)) { message.noPerms = client.messages.noPerms.replace("%commands.permissions%", commands.permissions); msg.channel.send(message.noPerms);