From af41365c7ba36b9acb6ad97d03b7f72fc64d7ce1 Mon Sep 17 00:00:00 2001 From: JustMaffie Date: Sun, 28 May 2017 00:11:35 +0200 Subject: [PATCH] Added commands I think --- discordbot/titanembeds/bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/discordbot/titanembeds/bot.py b/discordbot/titanembeds/bot.py index 3b408aa..d492b5d 100644 --- a/discordbot/titanembeds/bot.py +++ b/discordbot/titanembeds/bot.py @@ -13,9 +13,9 @@ logging.getLogger('sqlalchemy') bot = commands.Bot(command_prefix=config['command-prefix']) database = DatabaseInterface(bot) -def _cleanup(self): +def _cleanup(): try: - bot.loop.run_until_complete(self.logout()) + bot.loop.run_until_complete(logout()) except: # Can be ignored pass pending = asyncio.Task.all_tasks() @@ -194,7 +194,7 @@ except discord.errors.LoginFailure: print("Invalid bot token in config!") finally: try: - self._cleanup() + _cleanup() except Exception as e: print("Error in cleanup:", e) bot.loop.close() \ No newline at end of file