From e9ad93c92961f1c96af3f53824e92f05553efe84 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Mon, 17 Feb 2020 14:40:53 -0800 Subject: [PATCH] Refractor bot start code --- discordbot/titanembeds/bot.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/discordbot/titanembeds/bot.py b/discordbot/titanembeds/bot.py index 24db469..9a682c7 100644 --- a/discordbot/titanembeds/bot.py +++ b/discordbot/titanembeds/bot.py @@ -50,19 +50,7 @@ class Titan(discord.AutoShardedClient): self.loop.run_until_complete(gathered) gathered.exception() except: # Can be ignored - pass - - def run(self): - try: - self.loop.run_until_complete(self.start()) - except discord.errors.LoginFailure: - print("Invalid bot token in config!") - finally: - try: - self._cleanup() - except Exception as e: - print("Error in cleanup:", e) - self.loop.close() + pass async def start(self): await self.redisqueue.connect()