diff --git a/core/bot.py b/core/bot.py index 3b3de69..60f273a 100644 --- a/core/bot.py +++ b/core/bot.py @@ -124,8 +124,6 @@ class Bot(object): """quits all networks and shuts the bot down""" self.logger.info("Stopping bot.") - # wait for the bot loop to stop - time.sleep(1) self.config.observer.stop() self.logger.debug("Stopping config reloader.") @@ -147,6 +145,9 @@ class Bot(object): self.running = False + # wait for the bot loop to stop + time.sleep(1) + def restart(self, reason=None): """shuts the bot down and restarts it"""