From 14711de6de91d46dc0517201c01d52eef8ddf33e Mon Sep 17 00:00:00 2001 From: Matthew R Date: Wed, 15 Apr 2020 15:12:56 -0400 Subject: [PATCH] check for user perms in message create --- src/events/messageCreate.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts index 44d5474..72a1b65 100644 --- a/src/events/messageCreate.ts +++ b/src/events/messageCreate.ts @@ -18,6 +18,7 @@ export default class { if (!resolved) return; if (resolved.cmd.guildOnly && !(message.channel instanceof TextChannel)) return; if (!resolved.cmd.enabled) { message.channel.createMessage(`***${this.client.util.emojis.ERROR} This command has been disabled***`); return; } + if (!resolved.cmd.checkPermissions(message.member)) return; this.client.util.signale.info(`User '${message.author.username}#${message.author.discriminator}' ran command '${resolved.cmd.name}' in '${message.channel.id}'.`); await resolved.cmd.run(message, resolved.args); } catch (err) {