diff options
author | 2022-11-15 10:26:14 +0000 | |
---|---|---|
committer | 2022-11-25 22:43:46 +0000 | |
commit | 12f6339ccff0282bd8069398aedccecde61660e5 (patch) | |
tree | 6c8430919368c64779b011a1c968b1927df8fdd7 | |
parent | Add hf as an alias for the help-forum command group (diff) |
Pin the user's starter message on help post creation
-rw-r--r-- | bot/exts/help_channels/_channel.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bot/exts/help_channels/_channel.py b/bot/exts/help_channels/_channel.py index 38725ddfd..a191e1ed7 100644 --- a/bot/exts/help_channels/_channel.py +++ b/bot/exts/help_channels/_channel.py @@ -109,6 +109,10 @@ async def help_thread_opened(opened_thread: discord.Thread, *, reopen: bool = Fa await _close_help_thread(opened_thread, _stats.ClosingReason.CLEANUP) return + if opened_thread.starter_message: + # To cover the case where the user deletes their starter message before code execution reaches this line. + await opened_thread.starter_message.pin() + await send_opened_post_message(opened_thread) await send_opened_post_dm(opened_thread) |