From b9911aa75d3fc5642003c14c195b39baf42d15d9 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 7 Jun 2021 20:01:15 -0400 Subject: [PATCH] Fix --- commands/games-sp/akinator.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/commands/games-sp/akinator.js b/commands/games-sp/akinator.js index a40792bf..94f6d98d 100644 --- a/commands/games-sp/akinator.js +++ b/commands/games-sp/akinator.js @@ -82,14 +82,15 @@ module.exports = class AkinatorCommand extends Command { for (const answer of aki.answers) { row.addComponents(new MessageButton().setCustomID(answer).setStyle('PRIMARY').setLabel(answer)); } + const sRow = new MessageActionRow(); if (aki.currentStep > 0) { - row.addComponents(new MessageButton().setCustomID('back').setStyle('SECONDARY').setLabel('Back')); + sRow.addComponents(new MessageButton().setCustomID('back').setStyle('SECONDARY').setLabel('Back')); } - row.addComponents(new MessageButton().setCustomID('end').setStyle('DANGER').setLabel('End')); + sRow.addComponents(new MessageButton().setCustomID('end').setStyle('DANGER').setLabel('End')); await buttonPress.editReply(stripIndents` **${aki.currentStep + 1}.** ${aki.question} (${Math.round(Number.parseInt(aki.progress, 10))}%) ${aki.answers.join(' | ')}${aki.currentStep > 0 ? ` | Back` : ''} | End - `, { components: [row] }); + `, { components: [row, sRow] }); const interactions = await gameMsg.awaitMessageComponentInteractions(res => res.user.id === msg.author.id, { max: 1, time: 30000