From 770fe2c4ab63533c2ebcb926827bbaf3b791f438 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 22 Apr 2024 15:53:06 -0400 Subject: [PATCH] Fix --- commands/games-sp/akinator.js | 5 ++++- structures/Akinator.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/games-sp/akinator.js b/commands/games-sp/akinator.js index 9d626bdf..98354c53 100644 --- a/commands/games-sp/akinator.js +++ b/commands/games-sp/akinator.js @@ -68,7 +68,10 @@ module.exports = class AkinatorCommand extends Command { } else { await aki.step(ans); } - if (aki.guessed) { + if (!aki.question) { + win = false; + break; + } else if (aki.guessed) { const guess = aki.guessed; timesGuessed++; const embed = new EmbedBuilder() diff --git a/structures/Akinator.js b/structures/Akinator.js index 401d01fa..8d6bd708 100644 --- a/structures/Akinator.js +++ b/structures/Akinator.js @@ -57,6 +57,7 @@ class Akinator { this.currentStep++; this.progress = body.progression; this.question = body.question; + if (!this.question) this.akiWin = false; return this; }