Step Limit

This commit is contained in:
Daniel Odendahl Jr
2017-09-19 21:24:08 +00:00
parent 87c531d6b0
commit 24155cc5dd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "41.1.0",
"version": "41.1.1",
"description": "Your personal server companion.",
"main": "Shard.js",
"scripts": {