mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 22:01:54 +02:00
Step Limit
This commit is contained in:
@@ -20,7 +20,7 @@ module.exports = class AkinatorCommand extends Command {
|
||||
try {
|
||||
let ans = null;
|
||||
this.sessions.set(msg.channel.id, { progress: null });
|
||||
while (this.sessions.get(msg.channel.id).progress < 99) {
|
||||
while (this.sessions.get(msg.channel.id).progress < 99 && ++this.sessions.get(msg.channel.id).step <= 80) {
|
||||
const data = ans === null ? await this.createSession(msg.channel) : await this.progress(msg.channel, ans);
|
||||
const answers = data.answers.map(answer => answer.answer.toLowerCase());
|
||||
await msg.say(stripIndents`
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "41.1.0",
|
||||
"version": "41.1.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Shard.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user