mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -56,7 +56,7 @@ module.exports = class AkinatorCommand extends Command {
|
||||
return gameMsg.edit('Guess you didn\'t want to play after all...', { components: [] });
|
||||
}
|
||||
let buttonPress = initialVerify.first();
|
||||
if (buttonPress.customID === 'false') return buttonPress.update('Too bad...', { components: [] });
|
||||
if (buttonPress.customId === 'false') return buttonPress.update('Too bad...', { components: [] });
|
||||
await this.sendLoadingMessage(buttonPress, [initialRow]);
|
||||
const guessBlacklist = [];
|
||||
while (timesGuessed < 3) {
|
||||
@@ -96,7 +96,7 @@ module.exports = class AkinatorCommand extends Command {
|
||||
}
|
||||
buttonPress = interactions.first();
|
||||
await this.sendLoadingMessage(buttonPress, [row, sRow]);
|
||||
const choice = interactions.first().customID;
|
||||
const choice = interactions.first().customId;
|
||||
if (choice === 'end') {
|
||||
forceGuess = true;
|
||||
} else if (choice === 'back') {
|
||||
@@ -138,7 +138,7 @@ module.exports = class AkinatorCommand extends Command {
|
||||
}
|
||||
buttonPress = verification.first();
|
||||
await this.sendLoadingMessage(buttonPress, [guessRow]);
|
||||
if (buttonPress.customID === 'true') {
|
||||
if (buttonPress.customId === 'true') {
|
||||
win = false;
|
||||
break;
|
||||
} else if (timesGuessed >= 3 || forceGuess) {
|
||||
|
||||
@@ -62,7 +62,7 @@ module.exports = class TrueOrFalseCommand extends Command {
|
||||
});
|
||||
if (!interactions.size) return questionMsg.edit(`Sorry, time is up! It was ${correctBool}.`, { components: [] });
|
||||
const ans = interactions.first();
|
||||
const ansBool = ans.customID === 'true';
|
||||
const ansBool = ans.customId === 'true';
|
||||
if (correctBool !== ansBool) return ans.update(`Nope, sorry, it's ${correctBool}.`, { components: [] });
|
||||
return ans.update('Nice job! 10/10! You deserve some cake!', { components: [] });
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ module.exports = class KinoCommand extends Command {
|
||||
});
|
||||
if (!initialInteractions.size) return initialMsg.edit('Maybe next time!', { components: [] });
|
||||
let choice = initialInteractions.first();
|
||||
if (choice.customID === 'end') return choice.update('Maybe next time!', { components: [] });
|
||||
if (choice.customId === 'end') return choice.update('Maybe next time!', { components: [] });
|
||||
while (!end) {
|
||||
if (i === 0) {
|
||||
row.components[0].setDisabled(true);
|
||||
@@ -101,11 +101,11 @@ module.exports = class KinoCommand extends Command {
|
||||
});
|
||||
if (!interactions.size) break;
|
||||
choice = interactions.first();
|
||||
if (choice.customID === 'next') {
|
||||
if (choice.customId === 'next') {
|
||||
i++;
|
||||
} else if (choice.customID === 'prev') {
|
||||
} else if (choice.customId === 'prev') {
|
||||
i--;
|
||||
} else if (choice.customID === 'end') {
|
||||
} else if (choice.customId === 'end') {
|
||||
break;
|
||||
} else {
|
||||
return initialMsg.edit('Maybe next time!', { components: [] });
|
||||
|
||||
+2
-2
@@ -348,7 +348,7 @@ module.exports = class Util {
|
||||
const filter = interaction => {
|
||||
if (interaction.user.bot) return false;
|
||||
if (blacklist.includes(interaction.user.id)) return false;
|
||||
if (interaction.user.id !== msg.author.id && interaction.customID === 'start') return false;
|
||||
if (interaction.user.id !== msg.author.id && interaction.customId === 'start') return false;
|
||||
if (joined.includes(interaction.user.id)) return false;
|
||||
return true;
|
||||
};
|
||||
@@ -358,7 +358,7 @@ module.exports = class Util {
|
||||
time: 120000
|
||||
});
|
||||
collector.on('collect', interaction => {
|
||||
if (interaction.customID === 'start') {
|
||||
if (interaction.customId === 'start') {
|
||||
interaction.deferUpdate();
|
||||
collector.stop();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user