From 0f38580f1dcf42354b3da258392b58011ae373eb Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 27 Oct 2019 22:50:41 -0400 Subject: [PATCH] fix command handler issue --- src/events/messageCreate.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts index fe5cc23..c55a82a 100644 --- a/src/events/messageCreate.ts +++ b/src/events/messageCreate.ts @@ -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);