fix command handler issue

merge-requests/1/merge
Matthew 2019-10-27 22:31:14 -04:00
parent b87f1c112b
commit 5ae041c1c7
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 3 additions and 1 deletions

View File

@ -19,8 +19,10 @@ export default class {
if (!resolved) return;
if (resolved.guildOnly && !(message.channel instanceof TextChannel)) return;
let hasUserPerms: boolean;
if (resolved.permissions.users.length > 0) {
if (resolved.permissions.users) {
hasUserPerms = resolved.permissions.users.includes(message.author.id);
} else {
hasUserPerms = true;
}
let hasRolePerms: boolean = false;
if (resolved.permissions.roles) {