1
0
Fork 0

fix command handler issue

refactor/models
Matthew 2019-10-27 22:50:41 -04:00
parent 51c8b12e84
commit 0f38580f1d
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 4 additions and 3 deletions

View File

@ -19,11 +19,8 @@ export default class {
if (!resolved) return;
if (resolved.guildOnly && !(message.channel instanceof TextChannel)) return;
let hasUserPerms: boolean;
this.client.signale.debug(hasUserPerms);
if (resolved.permissions.users) {
hasUserPerms = resolved.permissions.users.includes(message.author.id);
} else {
hasUserPerms = true;
}
let hasRolePerms: boolean = false;
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(hasUserPerms);
this.client.signale.debug(hasRolePerms);