React on answer in lie-swatter

This commit is contained in:
Dragon Fire
2020-04-21 23:01:39 -04:00
parent 67a5b6cadf
commit 783d34f688
+5 -1
View File
@@ -69,7 +69,11 @@ module.exports = class LieSwatterCommand extends Command {
const filter = res => {
if (!awaitedPlayers.includes(res.author.id)) return false;
const answer = res.content.toLowerCase();
return trueOptions.includes(answer) || falseOptions.includes(answer);
if (trueOptions.includes(answer) || falseOptions.includes(answer)) {
res.react(SUCCESS_EMOJI_ID || '✅').catch(() => null);
return true;
};
return false;
};
const msgs = await msg.channel.awaitMessages(filter, {
max: pts.size,