diff options
author | 2025-01-18 17:16:13 +0000 | |
---|---|---|
committer | 2025-01-18 18:04:02 +0000 | |
commit | 9ae49228be556faec0fe5dd135262004f8125139 (patch) | |
tree | 5cf02c987256626e5c82c396e0b73c82755d2f82 | |
parent | Significantly shorten help channel close message (diff) |
Change closing embed title based on close reason
-rw-r--r-- | bot/exts/help_channels/_channel.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bot/exts/help_channels/_channel.py b/bot/exts/help_channels/_channel.py index de679447d..36665e185 100644 --- a/bot/exts/help_channels/_channel.py +++ b/bot/exts/help_channels/_channel.py @@ -47,7 +47,16 @@ async def _close_help_post(closed_post: discord.Thread, closing_reason: _stats.C closed_post = await get_or_fetch_channel(bot.instance, closed_post.id) embed = discord.Embed(description=CLOSED_POST_MSG) - embed.set_author(name=f"{POST_TITLE} closed", icon_url=CLOSED_POST_ICON_URL) + if closing_reason == _stats.ClosingReason.CLEANUP: + close_title = "Python help channel closed as OP left server" + elif closing_reason == _stats.ClosingReason.COMMAND: + close_title = f"Python help channel closed by OP with {constants.Bot.prefix}close" + elif closing_reason == _stats.ClosingReason.INACTIVE: + close_title = "Python help channel closed for inactivity" + else: + close_title = "Python help channel closed" + + embed.set_author(name=close_title, icon_url=CLOSED_POST_ICON_URL) message = "" # Include a ping in the close message if no one else engages, to encourage them |