From 7091769b757320766bae54a0a122f729d716ea8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Mon, 30 Mar 2020 04:20:45 +0300 Subject: [PATCH] Trying to fix bitfield_invalid error when using stop command (part 2) --- struct/check.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/struct/check.js b/struct/check.js index d62bf83..9065f3b 100644 --- a/struct/check.js +++ b/struct/check.js @@ -10,10 +10,11 @@ module.exports = function (client, msg, command) { msg.channel.send(client.messageEmojis["x"] + client.messages.wrongVoiceChannel); return false; } - console.log(command.permission); - if (!permissions.has(command.permission)) { - message.noPerms = client.messages.noPerms.replace("%command.permission%", command.permission); - msg.channel.send(client.messageEmojis["x"] + message.noPerms); - return false; + if(!command.permission == 'none'){ + if (!permissions.has(command.permission)) { + message.noPerms = client.messages.noPerms.replace("%command.permission%", command.permission); + msg.channel.send(client.messageEmojis["x"] + message.noPerms); + return false; + } else return true; } else return true; };