forked from Galactic/galactic-bot
dev override
This commit is contained in:
parent
2cedc24e4e
commit
5443ed294c
@ -17,8 +17,12 @@ class Permissions extends Inhibitor {
|
|||||||
|
|
||||||
async execute(invoker, command, override = null) {
|
async execute(invoker, command, override = null) {
|
||||||
|
|
||||||
|
const userWrapper = await invoker.userWrapper();
|
||||||
|
if (userWrapper.developer) return super._succeed();
|
||||||
|
|
||||||
const { guild, member } = invoker;
|
const { guild, member } = invoker;
|
||||||
const { permissions: { type } } = await guild.settings();
|
const { permissions: { type } } = await guild.settings();
|
||||||
|
|
||||||
const permissions = override ?? command.memberPermissions;
|
const permissions = override ?? command.memberPermissions;
|
||||||
const memberPerms = invoker.channel.permissionsFor(member);
|
const memberPerms = invoker.channel.permissionsFor(member);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user