stats: fix over-reporting when on_ready is dispatched twice

This commit is contained in:
io mintz 2020-06-03 21:11:26 +00:00
parent 9d570b55fe
commit e284b9ee62
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,9 @@ class Stats(BotBinStats):
@commands.Cog.listener()
async def on_ready(self):
for shard_id in self.bot.shard_ids:
self.shlist[shard_id] = 0
for guild in self.bot.guilds:
self.shlist[guild.shard_id] += 1