From 5ccfaaf4c75a454783aa11d3cac8e482f83cc40c Mon Sep 17 00:00:00 2001 From: filipnyquist Date: Wed, 30 May 2018 18:44:20 +0200 Subject: [PATCH] Fixed problem with aliases causing bot to crash --- bot/bot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/bot.js b/bot/bot.js index 5015361..7a9db0e 100644 --- a/bot/bot.js +++ b/bot/bot.js @@ -101,11 +101,11 @@ function checkMessageForCommand(msg, isEdit) { } } let alias = aliases[cmdTxt]; + let cmd; if (alias) { - let cmd = alias; + cmd = alias; } else { - let cmd = commands[cmdTxt]; - + cmd = commands[cmdTxt]; } if (cmdTxt === 'help') { //help is special since it iterates over the other commands