yet another bugfix for permissions

This commit is contained in:
Erik 2021-06-11 13:06:43 +03:00
parent 90dcbccc99
commit 0e7b025c55
No known key found for this signature in database
GPG Key ID: 7E862371D3409F16

View File

@ -27,7 +27,7 @@ class Permissions extends Inhibitor {
//NOTE: Rewrite this entire fucking file :)
if(missing.length === permissions.length && permissions.length > 0) return super._fail({ missing: missing.join(', ') });
return super._succeed();
} else if(permissionType === 'grant' && command.permissionRequired) {
} else if(permissionType === 'grant' && permissions.length) {
// vv Prevent Softlock vv
if(safeCommands.includes(command.resolveable) && (this._checkDiscord(message, ['ADMINISTRATOR']).length === 0 || this._checkDiscord(message, ['MANAGE_GUILD']).length === 0)) {
return super._succeed();