From 38a840e5e5caaa97f6e50b3f4102d478910d5081 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 27 Oct 2019 20:19:55 -0400 Subject: [PATCH] get prefix from client, not directly --- src/events/messageCreate.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts index 5d225e6..93cb6a3 100644 --- a/src/events/messageCreate.ts +++ b/src/events/messageCreate.ts @@ -1,9 +1,7 @@ import { Message, TextChannel } from 'eris'; -import { Client, config } from '..'; +import { Client } from '..'; import Command from '../class/Command'; -const { prefix } = config; - export default class { public client: Client @@ -13,7 +11,7 @@ export default class { public async run(message: Message) { try { - const noPrefix: string[] = message.content.slice(prefix.length).trim().split(/ +/g); + 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); if (!resolved) return;