From 2274959f8a3830ce770548f9208199593d5d759f Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 27 Oct 2019 22:25:39 -0400 Subject: [PATCH] please --- src/events/messageCreate.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts index 3266587..f73098c 100644 --- a/src/events/messageCreate.ts +++ b/src/events/messageCreate.ts @@ -24,9 +24,11 @@ export default class { hasUserPerms = resolved.permissions.users.includes(message.author.id); } let hasRolePerms: boolean = false; - for (const role of resolved.permissions.roles) { - if (message.member && message.member.roles.includes(role)) { - hasRolePerms = true; break; + if (resolved.permissions.roles) { + for (const role of resolved.permissions.roles) { + if (message.member && message.member.roles.includes(role)) { + hasRolePerms = true; break; + } } } if (!hasRolePerms && !hasUserPerms) return;