mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 05:49:49 +02:00
Fix
This commit is contained in:
@@ -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.', {
|
const gameMsg = await msg.reply('Welcome to Akinator! Think of a character, and I will try to guess it.', {
|
||||||
components: [initialRow]
|
components: [initialRow]
|
||||||
});
|
});
|
||||||
|
let buttonPress;
|
||||||
try {
|
try {
|
||||||
const initialVerify = await gameMsg.awaitMessageComponent({
|
buttonPress = await gameMsg.awaitMessageComponent({
|
||||||
filter: res => res.user.id === msg.author.id,
|
filter: res => res.user.id === msg.author.id,
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 30000
|
time: 30000
|
||||||
@@ -99,7 +100,7 @@ module.exports = class AkinatorCommand extends Command {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
await this.sendLoadingMessage(buttonPress, [row, sRow]);
|
await this.sendLoadingMessage(buttonPress, [row, sRow]);
|
||||||
const choice = interactions.first().customId;
|
const choice = buttonPress.customId;
|
||||||
if (choice === 'end') {
|
if (choice === 'end') {
|
||||||
forceGuess = true;
|
forceGuess = true;
|
||||||
} else if (choice === 'back') {
|
} else if (choice === 'back') {
|
||||||
|
|||||||
Reference in New Issue
Block a user