From 19b4583d2c5d2a90cc99b7d4e87c0f5a692c5069 Mon Sep 17 00:00:00 2001 From: Jan <26145882+imverum@users.noreply.github.com> Date: Sun, 27 Dec 2020 12:57:38 +0100 Subject: [PATCH] Fixed bug --- util/eventHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/eventHandler.js b/util/eventHandler.js index 6ef2a3f..866d7de 100644 --- a/util/eventHandler.js +++ b/util/eventHandler.js @@ -23,7 +23,7 @@ client.on('message', message => { else if (msgContent.startsWith(`<@!${client.user.id}>`)) usedPrefix = `<@!${client.user.id}>`; if (!usedPrefix) return require('./69Reply').execute(message); - msgContent = msgContent.split(usedPrefix)[1]; + msgContent = msgContent.substr(msgContent.indexOf(usedPrefix) + 1, msgContent.length); if (msgContent.startsWith(' ') && usedPrefix != prefix) msgContent = msgContent.substr(1, msgContent.length); const args = msgContent.split(' '); const cmdName = args.shift()?.toLowerCase();