From 24155cc5dd46e9619787780e219611a2b6fc8388 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Tue, 19 Sep 2017 21:24:08 +0000 Subject: [PATCH] Step Limit --- commands/games/akinator.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/games/akinator.js b/commands/games/akinator.js index af653f21..a373ea2a 100644 --- a/commands/games/akinator.js +++ b/commands/games/akinator.js @@ -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` diff --git a/package.json b/package.json index 52587084..c287e0a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "41.1.0", + "version": "41.1.1", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {