forked from Galactic/galactic-bot
bugfix to perm check
This commit is contained in:
parent
51717cf7ef
commit
40e41af6ad
@ -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'
|
||||
});
|
||||
|
@ -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(', ') });
|
||||
|
Loading…
Reference in New Issue
Block a user