From 5ae041c1c7e51d4693babb4f642b9c430aedbe67 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 27 Oct 2019 22:31:14 -0400 Subject: [PATCH] fix command handler issue --- src/events/messageCreate.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts index bfa775a..3459c26 100644 --- a/src/events/messageCreate.ts +++ b/src/events/messageCreate.ts @@ -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) {