From 0ec6e75959ccbb2df182dbdda52f5cd904456d2c Mon Sep 17 00:00:00 2001 From: Navy Date: Wed, 9 Jun 2021 23:44:53 +0300 Subject: [PATCH] bugfix to perm check when using both --- structure/client/components/inhibitors/Permissions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/structure/client/components/inhibitors/Permissions.js b/structure/client/components/inhibitors/Permissions.js index 4720717..d90e1b5 100644 --- a/structure/client/components/inhibitors/Permissions.js +++ b/structure/client/components/inhibitors/Permissions.js @@ -31,8 +31,9 @@ class Permissions extends Inhibitor { } missing = await this._checkGrants(message, command.resolveable); } else { - missing = this._checkDiscord(message, permissions); - missing.concat(await this._checkGrants(message, command.resolveable)); + 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(', ') }); } if(missing.length > 0) {