bugfix to perm check when using both

This commit is contained in:
Erik 2021-06-09 23:44:53 +03:00
parent 106efcc1a1
commit 0ec6e75959
No known key found for this signature in database
GPG Key ID: 7E862371D3409F16

View File

@ -31,8 +31,9 @@ class Permissions extends Inhibitor {
} }
missing = await this._checkGrants(message, command.resolveable); missing = await this._checkGrants(message, command.resolveable);
} else { } else {
missing = this._checkDiscord(message, permissions); const disc = this._checkDiscord(message, permissions);
missing.concat(await this._checkGrants(message, command.resolveable)); const grants = await this._checkGrants(message, command.resolveable);
if (disc.length && grants.length) return super._fail({ missing: [...disc, ...grants].join(', ') });
} }
if(missing.length > 0) { if(missing.length > 0) {