diff options
-rw-r--r-- | bot/exts/help_channels/_channel.py | 4 | ||||
-rw-r--r-- | bot/exts/help_channels/_cog.py | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/bot/exts/help_channels/_channel.py b/bot/exts/help_channels/_channel.py index 25a1bf4d2..0cee24817 100644 --- a/bot/exts/help_channels/_channel.py +++ b/bot/exts/help_channels/_channel.py @@ -204,6 +204,10 @@ async def maybe_archive_idle_post(post: discord.Thread, scheduler: scheduling.Sc If `has_task` is True and rescheduling is required, the extant task to make the post dormant will first be cancelled. """ + if post.locked: + log.trace(f"Not closing already closed post #{post} ({post.id}).") + return + log.trace(f"Handling open post #{post} ({post.id}).") closing_time, closing_reason = await get_closing_time(post) diff --git a/bot/exts/help_channels/_cog.py b/bot/exts/help_channels/_cog.py index 146391dcf..31f30b7aa 100644 --- a/bot/exts/help_channels/_cog.py +++ b/bot/exts/help_channels/_cog.py @@ -91,6 +91,8 @@ class HelpForum(commands.Cog): if await self.close_check(ctx): log.info(f"Close command invoked by {ctx.author} in #{ctx.channel}.") await _channel.help_post_closed(ctx.channel) + if ctx.channel.id in self.scheduler: + self.scheduler.cancel(ctx.channel.id) @help_forum_group.command(name="dm", root_aliases=("helpdm",)) async def help_dm_command( |