diff --git a/framework/Dispatcher.js b/framework/Dispatcher.js index dc62bbe2..612d7645 100644 --- a/framework/Dispatcher.js +++ b/framework/Dispatcher.js @@ -23,7 +23,8 @@ module.exports = class CommandDispatcher { } async parseMessage(msg) { - const command = this.resolveCommand(command[2].toLowerCase()); + const matched = msg.content.match(this.commandPattern); + const command = this.resolveCommand(matched[2].toLowerCase()); if (!command) { return { command: this.registry.commands.find(cmd => cmd.unknown),