From 21b58e8e6cce672cf6334481760e8884562d7dc7 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 22 Apr 2024 15:38:51 -0400 Subject: [PATCH] Fix --- commands/games-sp/akinator.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/games-sp/akinator.js b/commands/games-sp/akinator.js index ba0f2b74..fee94c94 100644 --- a/commands/games-sp/akinator.js +++ b/commands/games-sp/akinator.js @@ -36,6 +36,7 @@ module.exports = class AkinatorCommand extends Command { let ans = null; let win = false; let wentBack = false; + let guessedLastTurn = false; let timesGuessed = 0; const initialRow = new ActionRowBuilder().addComponents( new ButtonBuilder().setCustomId('true').setLabel('Ready!').setStyle(ButtonStyle.Primary), @@ -62,7 +63,7 @@ module.exports = class AkinatorCommand extends Command { await aki.start(); } else if (wentBack) { wentBack = false; - } else { + } else if (!guessedLastTurn) { await aki.step(ans); } if (aki.guessed) { @@ -100,6 +101,7 @@ module.exports = class AkinatorCommand extends Command { break; } else if (buttonPress.customId === 'false') { await aki.guess(false, true); + guessedLastTurn = true; } } else { const row = new ActionRowBuilder();