Fixed playing a word without ongoing mash crashing bot.
This commit is contained in:
parent
cb023f0c28
commit
60c6f84702
|
@ -172,13 +172,13 @@ function onCommand(args, context) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!word && !mash) {
|
if (!word && mash) {
|
||||||
context.sendMessage(`Start a mash with ${config.prefix}mash {length}`, context.room.id);
|
context.sendMessage(`The current mash is: **${mash.anagram}**`, context.room.id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!word && mash) {
|
if (!word || !mash) {
|
||||||
context.sendMessage(`The current mash is: **${mash.anagram}**`, context.room.id);
|
context.sendMessage(`Start a mash with ${config.prefix}mash {length}`, context.room.id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue