diff options
| -rw-r--r-- | bot/exts/help_channels/_cog.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bot/exts/help_channels/_cog.py b/bot/exts/help_channels/_cog.py index 2b7cfcba7..9d80e193e 100644 --- a/bot/exts/help_channels/_cog.py +++ b/bot/exts/help_channels/_cog.py @@ -184,7 +184,6 @@ class HelpChannels(commands.Cog): if await self.close_check(ctx): log.info(f"Close command invoked by {ctx.author} in #{ctx.channel}.") await self.unclaim_channel(ctx.channel, "command") - self.scheduler.cancel(ctx.channel.id) async def get_available_candidate(self) -> discord.TextChannel: """ @@ -392,9 +391,13 @@ class HelpChannels(commands.Cog): await _message.unpin(channel) await _stats.report_complete_session(channel.id, caller) - await self.move_to_dormant(channel) + # Cancel the task that makes the channel dormant only if called by the close command. + # In other cases, the task is either already done or not-existent. + if caller == "command": + self.scheduler.cancel(channel.id) + async def move_to_in_use(self, channel: discord.TextChannel) -> None: """Make a channel in-use and schedule it to be made dormant.""" log.info(f"Moving #{channel} ({channel.id}) to the In Use category.") |