From 060a21a0b1fd04cc8ea1c8ad04196fb7931d8d12 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 20 Apr 2020 13:52:51 -0400 Subject: [PATCH] Fix --- commands/games-mp/guesspionage.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/commands/games-mp/guesspionage.js b/commands/games-mp/guesspionage.js index 259d3940..b0a529ff 100644 --- a/commands/games-mp/guesspionage.js +++ b/commands/games-mp/guesspionage.js @@ -115,13 +115,14 @@ module.exports = class GuesspionageCommand extends Command { } const higherLower = everyoneElse.map(res => ({ guess: res.content.toLowerCase(), id: res.author.id })); for (const answer of higherLower) { - if (answer === 'higher' && guess < question.answer) { + const uGuess = answer.guess; + if (uGuess === 'higher' && guess < question.answer) { pts.get(answer.id).points += 1000; - } else if (answer === 'lower' && guess > question.answer) { + } else if (uGuess === 'lower' && guess > question.answer) { pts.get(answer.id).points += 1000; - } else if (answer === 'much higher' && guess < question.answer && question.answer - guess >= 15) { + } else if (uGuess === 'much higher' && guess < question.answer && question.answer - guess >= 15) { pts.get(answer.id).points += 2000; - } else if (answer === 'much lower' && guess > question.answer && guess - question.answer >= 15) { + } else if (uGuess === 'much lower' && guess > question.answer && guess - question.answer >= 15) { pts.get(answer.id).points += 2000; } }