diff options
Diffstat (limited to 'bot/exts/help_channels/_stats.py')
| -rw-r--r-- | bot/exts/help_channels/_stats.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/help_channels/_stats.py b/bot/exts/help_channels/_stats.py index 8e6ff8fe5..b8778e7d9 100644 --- a/bot/exts/help_channels/_stats.py +++ b/bot/exts/help_channels/_stats.py @@ -22,12 +22,13 @@ def report_counts() -> None: log.warning(f"Couldn't find category {name!r} to track channel count stats.") -async def report_complete_session(channel_id: int, caller: str) -> None: +async def report_complete_session(channel_id: int, is_auto: bool) -> None: """ Report stats for a completed help session channel `channel_id`. - `caller` is used to track stats on how `channel_id` was unclaimed (either 'auto' or 'command'). + Set `is_auto` to True if the channel was automatically closed or False if manually closed. """ + caller = "auto" if is_auto else "command" bot.instance.stats.incr(f"help.dormant_calls.{caller}") in_use_time = await _channel.get_in_use_time(channel_id) |