diff options
author | 2020-04-12 11:12:01 +0100 | |
---|---|---|
committer | 2020-04-12 11:12:01 +0100 | |
commit | 7f1e65f51d6c597214bbdd7002d43afa4617e0c2 (patch) | |
tree | 2471fc06236078a2a0233621202b869aed080f09 | |
parent | Merge branch 'Numerlor-help-dormant-feedback' into `master` (diff) |
[stat] Create a statistic for whether dormant was called by the claimant or staff
-rw-r--r-- | bot/cogs/help_channels.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 4dd70d7bf..36ad6a7a3 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -198,10 +198,16 @@ class HelpChannels(Scheduler, commands.Cog): """Return True if the user is the help channel claimant or passes the role check.""" if self.help_channel_claimants.get(ctx.channel) == ctx.author: log.trace(f"{ctx.author} is the help channel claimant, passing the check for dormant.") + self.bot.stats.incr("help.dormant_invoke.claimant") return True log.trace(f"{ctx.author} is not the help channel claimant, checking roles.") - return with_role_check(ctx, *constants.HelpChannels.cmd_whitelist) + role_check = with_role_check(ctx, *constants.HelpChannels.cmd_whitelist) + + if role_check: + self.bot.stats.incr("help.dormant_invoke.staff") + + return role_check @commands.command(name="dormant", aliases=["close"], enabled=False) async def dormant_command(self, ctx: commands.Context) -> None: |