aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-08-05 15:34:58 -0700
committerGravatar MarkKoz <[email protected]>2020-08-05 15:34:58 -0700
commit9c76e33fbce15b4c42ca2e3966676bec27cfc2c0 (patch)
treef05857a1bf7733382f16e1cbf933a0ca1e7d2abf
parentHelpChannels: use more reliable check for claimed channel (diff)
HelpChannels: clear claimant cache when channel goes dormant
The claimed channel check in `on_message` relies on the cache being cleared when a channel goes dormant. If it's not cleared, it will think the channel is still in use.
-rw-r--r--bot/cogs/help_channels.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py
index 975043df9..5f7bb748c 100644
--- a/bot/cogs/help_channels.py
+++ b/bot/cogs/help_channels.py
@@ -215,9 +215,6 @@ class HelpChannels(commands.Cog):
log.trace("close command invoked; checking if the channel is in-use.")
if ctx.channel.category == self.in_use_category:
if await self.dormant_check(ctx):
-
- # Remove the claimant and the cooldown role
- await self.help_channel_claimants.delete(ctx.channel.id)
await self.remove_cooldown_role(ctx.author)
# Ignore missing task when cooldown has passed but the channel still isn't dormant.
@@ -551,6 +548,7 @@ class HelpChannels(commands.Cog):
A caller argument is provided for metrics.
"""
+ await self.help_channel_claimants.delete(channel.id)
msg_id = await self.question_messages.pop(channel.id)
try: