From 9c7be4f5331b73dd5a24e5b7d5c0fc1eccf861cf Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Thu, 21 Mar 2024 16:36:45 -0400 Subject: [PATCH] Fix --- commands/games-sp/akinator.js | 7 ++++--- structures/cards-against-humanity/Player.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/commands/games-sp/akinator.js b/commands/games-sp/akinator.js index 6e1ca33e..c2e07621 100644 --- a/commands/games-sp/akinator.js +++ b/commands/games-sp/akinator.js @@ -48,8 +48,9 @@ module.exports = class AkinatorCommand extends Command { const gameMsg = await msg.reply('Welcome to Akinator! Think of a character, and I will try to guess it.', { components: [initialRow] }); + let buttonPress; try { - const initialVerify = await gameMsg.awaitMessageComponent({ + buttonPress = await gameMsg.awaitMessageComponent({ filter: res => res.user.id === msg.author.id, max: 1, time: 30000 @@ -57,7 +58,7 @@ module.exports = class AkinatorCommand extends Command { if (initialVerify.customId === 'false') return initialVerify.update('Too bad...', { components: [] }); } catch { return gameMsg.edit('Guess you didn\'t want to play after all...', { components: [] }); - } + } await this.sendLoadingMessage(buttonPress, [initialRow]); const guessBlacklist = []; while (timesGuessed < 3) { @@ -99,7 +100,7 @@ module.exports = class AkinatorCommand extends Command { break; } await this.sendLoadingMessage(buttonPress, [row, sRow]); - const choice = interactions.first().customId; + const choice = buttonPress.customId; if (choice === 'end') { forceGuess = true; } else if (choice === 'back') { diff --git a/structures/cards-against-humanity/Player.js b/structures/cards-against-humanity/Player.js index 90451cfe..21c0ac62 100644 --- a/structures/cards-against-humanity/Player.js +++ b/structures/cards-against-humanity/Player.js @@ -64,7 +64,7 @@ module.exports = class Player { } return true; }, - time: 60000 + time: 60000 }); collector.on('collect', async msg => { const existing = hand[Number.parseInt(msg.content, 10) - 1];