From 40e41af6add10f1c8cbefb03d6730cd86f53d801 Mon Sep 17 00:00:00 2001 From: Navy Date: Fri, 11 Jun 2021 04:07:27 +0300 Subject: [PATCH] bugfix to perm check --- structure/client/components/commands/administration/Settings.js | 2 +- structure/client/components/inhibitors/Permissions.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/structure/client/components/commands/administration/Settings.js b/structure/client/components/commands/administration/Settings.js index 8483e0d..8df3b62 100644 --- a/structure/client/components/commands/administration/Settings.js +++ b/structure/client/components/commands/administration/Settings.js @@ -59,7 +59,7 @@ class SettingsCommand extends Command { const type = !message.guild || args.user ? 'USER' : 'GUILD'; if(type === 'GUILD') { - const permissions = this.client.permissions.execute(message, message.command, ['ADMINISTRATOR', 'MANAGE_GUILD']); + const permissions = await this.client.permissions.execute(message, message.command, ['ADMINISTRATOR', 'MANAGE_GUILD']); if(permissions.error) return message.respond(message.format('C_SETTINGS_MISSINGPERMISSIONS'), { emoji: 'failure' }); diff --git a/structure/client/components/inhibitors/Permissions.js b/structure/client/components/inhibitors/Permissions.js index d90e1b5..8b35093 100644 --- a/structure/client/components/inhibitors/Permissions.js +++ b/structure/client/components/inhibitors/Permissions.js @@ -30,7 +30,7 @@ class Permissions extends Inhibitor { return super._succeed(); } missing = await this._checkGrants(message, command.resolveable); - } else { + } else if(permissionType === 'both') { const disc = this._checkDiscord(message, permissions); const grants = await this._checkGrants(message, command.resolveable); if (disc.length && grants.length) return super._fail({ missing: [...disc, ...grants].join(', ') });