From ec5717d0a7f1728bd1991e53be213390f3ddae08 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 27 Oct 2019 22:03:05 -0400 Subject: [PATCH] fix command handler again --- src/events/messageCreate.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts index 86d8625..f857158 100644 --- a/src/events/messageCreate.ts +++ b/src/events/messageCreate.ts @@ -11,6 +11,8 @@ export default class { public async run(message: Message) { try { + if (message.author.bot) return; + if (message.content.indexOf(this.client.config.prefix) !== 0) return; const noPrefix: string[] = message.content.slice(this.client.config.prefix.length).trim().split(/ +/g); const command: string = noPrefix[0].toLowerCase(); const resolved: Command = this.client.util.resolveCommand(command);