From e284b9ee62cbc7ded6a8559ed6bf45892b3d0390 Mon Sep 17 00:00:00 2001 From: io mintz Date: Wed, 3 Jun 2020 21:11:26 +0000 Subject: [PATCH] stats: fix over-reporting when on_ready is dispatched twice --- cogs/stats.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cogs/stats.py b/cogs/stats.py index fc1fecd..4db6239 100644 --- a/cogs/stats.py +++ b/cogs/stats.py @@ -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