mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 06:27:03 +01:00
Refractor bot start code
This commit is contained in:
parent
6d7ccdbec7
commit
e9ad93c929
@ -52,18 +52,6 @@ class Titan(discord.AutoShardedClient):
|
||||
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()
|
||||
|
||||
async def start(self):
|
||||
await self.redisqueue.connect()
|
||||
await super().start(config["bot-token"])
|
||||
|
Loading…
Reference in New Issue
Block a user