diff options
| author | 2020-04-12 00:09:53 +0100 | |
|---|---|---|
| committer | 2020-04-12 00:10:20 +0100 | |
| commit | 4adcb0b0ab2b8768e31043429bdfcbf4dab607e6 (patch) | |
| tree | 269f1a9d9ceb4572a67677079e54281a9fb5749f | |
| parent | Add a metric for tracking how long defcon was active (diff) | |
Address aeros' review comment regarding help channel stat reporting
| -rw-r--r-- | bot/cogs/help_channels.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 632c78701..d260a6a33 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -374,9 +374,9 @@ class HelpChannels(Scheduler, commands.Cog): def report_stats(self) -> None: """Report the channel count stats.""" - total_in_use = len(list(self.get_category_channels(self.in_use_category))) - total_available = len(list(self.get_category_channels(self.available_category))) - total_dormant = len(list(self.get_category_channels(self.dormant_category))) + total_in_use = sum(1 for _ in self.get_category_channels(self.in_use_category)) + total_available = sum(1 for _ in self.get_category_channels(self.available_category)) + total_dormant = sum(1 for _ in self.get_category_channels(self.dormant_category)) self.bot.stats.gauge("help.total.in_use", total_in_use) self.bot.stats.gauge("help.total.available", total_available) |