From 8bcd610462adf3326826629fd84d1e5493fdbc48 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 27 Oct 2019 22:21:16 -0400 Subject: [PATCH] please --- src/events/messageCreate.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts index f857158..60b9f92 100644 --- a/src/events/messageCreate.ts +++ b/src/events/messageCreate.ts @@ -21,18 +21,12 @@ export default class { let hasUserPerms: boolean; if (resolved.permissions.users) { hasUserPerms = resolved.permissions.users.includes(message.author.id); - } else { - hasUserPerms = true; } let hasRolePerms: boolean = false; - if (resolved.permissions.roles) { - for (const role of resolved.permissions.roles) { - if (message.member && message.member.roles.includes(role)) { - hasRolePerms = true; break; - } + for (const role of resolved.permissions.roles) { + if (message.member && message.member.roles.includes(role)) { + hasRolePerms = true; break; } - } else { - hasRolePerms = true; } if (!hasRolePerms && !hasUserPerms) return; if (!resolved.enabled) { message.channel.createMessage(`***${this.client.stores.emojis.error} This command has been disabled***`); return; }