From be71d99f09b2aef7c665c0ec99f2d194a6a63ced Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Mon, 21 Aug 2017 02:10:51 +0000 Subject: [PATCH] Fix Restart --- XiaoBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XiaoBot.js b/XiaoBot.js index c587c199..f9e7dd0a 100644 --- a/XiaoBot.js +++ b/XiaoBot.js @@ -114,7 +114,7 @@ client.setTimeout(async () => { const battle = client.registry.resolveCommand('games:battle').fighting.size; const hangman = client.registry.resolveCommand('games:hangman').playing.size; const gunfight = client.registry.resolveCommand('games:gunfight').fighting.size; - while (battle && hangman && gunfight) { // eslint-disable-line no-unmodified-loop-condition + while (battle > 0 || hangman > 0 || gunfight > 0) { // eslint-disable-line no-unmodified-loop-condition console.log('[RESTART] A game is going on, delaying...'); await wait(5000); }