Connect to redis after bot is ready

This commit is contained in:
Jeremy "EndenDragon" Zhang 2020-02-16 13:23:27 -08:00 committed by GitHub
parent 8cc3a24389
commit d5492af9df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,6 @@ class Titan(discord.AutoShardedClient):
self.loop.close()
async def start(self):
await self.redisqueue.connect()
await super().start(config["bot-token"])
async def on_ready(self):
@ -76,6 +75,7 @@ class Titan(discord.AutoShardedClient):
print('------')
print("Shard count: " + str(self.shard_count))
print("------")
await self.redisqueue.connect()
self.loop.create_task(self.redisqueue.subscribe())
self.discordBotsOrg = DiscordBotsOrg(self.user.id, config.get("discord-bots-org-token", None))