Fixed playing a word without ongoing mash crashing bot.

This commit is contained in:
ThePendulum 2021-11-16 00:12:55 +01:00
parent cb023f0c28
commit 60c6f84702
1 changed files with 4 additions and 4 deletions

View File

@ -172,13 +172,13 @@ function onCommand(args, context) {
return;
}
if (!word && !mash) {
context.sendMessage(`Start a mash with ${config.prefix}mash {length}`, context.room.id);
if (!word && mash) {
context.sendMessage(`The current mash is: **${mash.anagram}**`, context.room.id);
return;
}
if (!word && mash) {
context.sendMessage(`The current mash is: **${mash.anagram}**`, context.room.id);
if (!word || !mash) {
context.sendMessage(`Start a mash with ${config.prefix}mash {length}`, context.room.id);
return;
}