fix command handler issue
parent
51c8b12e84
commit
0f38580f1d
|
@ -19,11 +19,8 @@ export default class {
|
||||||
if (!resolved) return;
|
if (!resolved) return;
|
||||||
if (resolved.guildOnly && !(message.channel instanceof TextChannel)) return;
|
if (resolved.guildOnly && !(message.channel instanceof TextChannel)) return;
|
||||||
let hasUserPerms: boolean;
|
let hasUserPerms: boolean;
|
||||||
this.client.signale.debug(hasUserPerms);
|
|
||||||
if (resolved.permissions.users) {
|
if (resolved.permissions.users) {
|
||||||
hasUserPerms = resolved.permissions.users.includes(message.author.id);
|
hasUserPerms = resolved.permissions.users.includes(message.author.id);
|
||||||
} else {
|
|
||||||
hasUserPerms = true;
|
|
||||||
}
|
}
|
||||||
let hasRolePerms: boolean = false;
|
let hasRolePerms: boolean = false;
|
||||||
if (resolved.permissions.roles) {
|
if (resolved.permissions.roles) {
|
||||||
|
@ -35,6 +32,10 @@ export default class {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!resolved.permissions.users && !resolved.permissions.roles) {
|
||||||
|
hasUserPerms = true;
|
||||||
|
hasRolePerms = true;
|
||||||
|
}
|
||||||
this.client.signale.debug('---');
|
this.client.signale.debug('---');
|
||||||
this.client.signale.debug(hasUserPerms);
|
this.client.signale.debug(hasUserPerms);
|
||||||
this.client.signale.debug(hasRolePerms);
|
this.client.signale.debug(hasRolePerms);
|
||||||
|
|
Loading…
Reference in New Issue