Fixed problem with aliases causing bot to crash

This commit is contained in:
filipnyquist 2018-05-30 18:44:20 +02:00
parent 01ff2d995a
commit 5ccfaaf4c7

View file

@ -101,11 +101,11 @@ function checkMessageForCommand(msg, isEdit) {
} }
} }
let alias = aliases[cmdTxt]; let alias = aliases[cmdTxt];
let cmd;
if (alias) { if (alias) {
let cmd = alias; cmd = alias;
} else { } else {
let cmd = commands[cmdTxt]; cmd = commands[cmdTxt];
} }
if (cmdTxt === 'help') { if (cmdTxt === 'help') {
//help is special since it iterates over the other commands //help is special since it iterates over the other commands