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
@ -50,19 +50,7 @@ class Titan(discord.AutoShardedClient):
|
|||||||
self.loop.run_until_complete(gathered)
|
self.loop.run_until_complete(gathered)
|
||||||
gathered.exception()
|
gathered.exception()
|
||||||
except: # Can be ignored
|
except: # Can be ignored
|
||||||
pass
|
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):
|
async def start(self):
|
||||||
await self.redisqueue.connect()
|
await self.redisqueue.connect()
|
||||||
|
Loading…
Reference in New Issue
Block a user