From e5ef86193b1f7a3d5f95516f1ebc898d4b1709c1 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Fri, 11 Sep 2026 17:56:07 +0100 Subject: [PATCH] Ensure the bot always closes help channels Channels can be archived/locked by post openers, but that flow doens't go through our flow that renames & records stats. help_post_archived already uses the audit log to check if the bot archived the channel, and if not goes through the close process, so we just reuse that --- bot/exts/help_channels/_channel.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bot/exts/help_channels/_channel.py b/bot/exts/help_channels/_channel.py index 8c33f6bebf..92b9a93e42 100644 --- a/bot/exts/help_channels/_channel.py +++ b/bot/exts/help_channels/_channel.py @@ -199,7 +199,9 @@ async def maybe_archive_idle_post(post_id: int, scheduler: scheduling.Scheduler) return if post.archived or post.locked: - log.trace(f"Not closing already closed post #{post} ({post.id}).") + # Could have been closed by us already, or manually archived/locked by the owner. + # help_post_archived tells the two apart via the audit log. + await help_post_archived(post, scheduler) return log.trace(f"Handling open post #{post} ({post.id}).")