aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/help_channels/_channel.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bot/exts/help_channels/_channel.py b/bot/exts/help_channels/_channel.py
index e11adcb75..3e674dfb9 100644
--- a/bot/exts/help_channels/_channel.py
+++ b/bot/exts/help_channels/_channel.py
@@ -215,6 +215,12 @@ 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.
"""
+ try:
+ await post.guild.fetch_channel(post.id)
+ except discord.HTTPException:
+ log.trace(f"Not closing missing post #{post} ({post.id}).")
+ return
+
if post.locked:
log.trace(f"Not closing already closed post #{post} ({post.id}).")
return