aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2025-01-18 17:22:29 +0000
committerGravatar Chris Lovering <[email protected]>2025-01-18 18:04:28 +0000
commit3fbd94acd81eda706f82d9682bd3ddeef932d7f6 (patch)
treed83340608e370f59fa2683450aef382295d10b6f
parentAdd closing reason for when OP closes uses native Discord close option (diff)
Don't repeat start of close message in every if branch
Diffstat (limited to '')
-rw-r--r--bot/exts/help_channels/_channel.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bot/exts/help_channels/_channel.py b/bot/exts/help_channels/_channel.py
index 1d43b6177..1b847bdb8 100644
--- a/bot/exts/help_channels/_channel.py
+++ b/bot/exts/help_channels/_channel.py
@@ -47,16 +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)
+ close_title = "Python help channel closed"
if closing_reason == _stats.ClosingReason.CLEANUP:
- close_title = "Python help channel closed as OP left server"
+ close_title += " as OP left server"
elif closing_reason == _stats.ClosingReason.COMMAND:
- close_title = f"Python help channel closed by OP with {constants.Bot.prefix}close"
+ close_title += f" by OP with {constants.Bot.prefix}close"
elif closing_reason == _stats.ClosingReason.INACTIVE:
- close_title = "Python help channel closed for inactivity"
+ close_title += " for inactivity"
elif closing_reason == _stats.ClosingReason.NATIVE:
- close_title = "Python help channel closed by OP"
- else:
- close_title = "Python help channel closed"
+ close_title += " by OP"
+
embed.set_author(name=close_title, icon_url=CLOSED_POST_ICON_URL)
message = ""