From be462cea1d01d6cdd4b3c51f9adca51e935e24d6 Mon Sep 17 00:00:00 2001 From: Isaac Date: Fri, 21 May 2021 19:51:38 +0100 Subject: [PATCH] Fix help command permission filtering --- src/commands/help.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/help.js b/src/commands/help.js index 9a176db..7343641 100644 --- a/src/commands/help.js +++ b/src/commands/help.js @@ -39,9 +39,10 @@ module.exports = class HelpCommand extends Command { if (cmd) { return await cmd.sendUsage(message.channel, args); } else { - const commands = this.manager.commands.filter(async command => { + const is_staff = await message.member.isStaff(); + const commands = this.manager.commands.filter(command => { if (command.permissions.length >= 1) return !message.member.hasPermission(command.permissions); - else if (command.staff_only) return await message.member.isStaff(); + else if (command.staff_only) return is_staff; }); const list = commands.map(command => { const description = command.description.length > 50