Fixed bug

This commit is contained in:
Jan 2020-12-27 12:57:38 +01:00
parent 6b03ce8f7d
commit 19b4583d2c

View file

@ -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();