mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 22:34:46 +02:00
Fix akinator question number
This commit is contained in:
@@ -60,13 +60,13 @@ module.exports = class AkinatorCommand extends Command {
|
|||||||
await aki.step(ans);
|
await aki.step(ans);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!aki.answers || aki.currentStep >= 78) forceGuess = true;
|
if (!aki.answers || aki.currentStep >= 79) forceGuess = true;
|
||||||
const answers = aki.answers.map(answer => answer.toLowerCase());
|
const answers = aki.answers.map(answer => answer.toLowerCase());
|
||||||
answers.push('end');
|
answers.push('end');
|
||||||
if (aki.currentStep + 2 > 1) answers.push('back');
|
if (aki.currentStep > 0) answers.push('back');
|
||||||
await msg.say(stripIndents`
|
await msg.say(stripIndents`
|
||||||
**${aki.currentStep + 2}.** ${aki.question} (${Math.round(Number.parseInt(aki.progress, 10))}%)
|
**${aki.currentStep + 1}.** ${aki.question} (${Math.round(Number.parseInt(aki.progress, 10))}%)
|
||||||
${aki.answers.join(' | ')}${aki.currentStep + 2 > 1 ? ` | Back` : ''} | End
|
${aki.answers.join(' | ')}${aki.currentStep > 0 ? ` | Back` : ''} | End
|
||||||
`);
|
`);
|
||||||
const filter = res => res.author.id === msg.author.id && answers.includes(res.content.toLowerCase());
|
const filter = res => res.author.id === msg.author.id && answers.includes(res.content.toLowerCase());
|
||||||
const msgs = await msg.channel.awaitMessages(filter, {
|
const msgs = await msg.channel.awaitMessages(filter, {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "114.17.1",
|
"version": "114.17.2",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user