On ready to on shard ready

This commit is contained in:
Jeremy Zhang 2020-02-17 14:47:32 -08:00
parent e9ad93c929
commit 712cc3aba7

View File

@ -56,13 +56,14 @@ class Titan(discord.AutoShardedClient):
await self.redisqueue.connect() await self.redisqueue.connect()
await super().start(config["bot-token"]) await super().start(config["bot-token"])
async def on_ready(self): async def on_shard_ready(self, shard_id):
print('Titan [DiscordBot]') print('Titan [DiscordBot]')
print('Logged in as the following user:') print('Logged in as the following user:')
print(self.user.name) print(self.user.name)
print(self.user.id) print(self.user.id)
print('------') print('------')
print("Shard count: " + str(self.shard_count)) print("Shard count: " + str(self.shard_count))
print("Shard id: "+ str(shard_id))
print("------") print("------")
self.loop.create_task(self.redisqueue.subscribe()) self.loop.create_task(self.redisqueue.subscribe())