aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2021-08-15 18:45:25 -0700
committerGravatar MarkKoz <[email protected]>2021-08-15 18:58:14 -0700
commitf6a1f00b637fd8e7922913d530cf0d7cc54ec225 (patch)
treeb856cf892c4696be251d03d81f608cf505eff3c2
parentHelpChannels: fix incomplete init of available channel set (diff)
HelpChannels: simplify formatting of category names in dormant msg
Remove redundant retrieval of category objects. Include the asking guide URL in the message via an f-string.
-rw-r--r--bot/exts/help_channels/_cog.py7
-rw-r--r--bot/exts/help_channels/_message.py8
2 files changed, 6 insertions, 9 deletions
diff --git a/bot/exts/help_channels/_cog.py b/bot/exts/help_channels/_cog.py
index 34fae7248..e71e58e7b 100644
--- a/bot/exts/help_channels/_cog.py
+++ b/bot/exts/help_channels/_cog.py
@@ -391,13 +391,10 @@ class HelpChannels(commands.Cog):
)
log.trace(f"Sending dormant message for #{channel} ({channel.id}).")
- dormant_category = await channel_utils.try_get_channel(constants.Categories.help_dormant)
- available_category = await channel_utils.try_get_channel(constants.Categories.help_available)
embed = discord.Embed(
description=_message.DORMANT_MSG.format(
- dormant=dormant_category.name,
- available=available_category.name,
- asking_guide=_message.ASKING_GUIDE_URL
+ dormant=self.dormant_category.name,
+ available=self.available_category.name,
)
)
await channel.send(embed=embed)
diff --git a/bot/exts/help_channels/_message.py b/bot/exts/help_channels/_message.py
index cf070be83..077b20b47 100644
--- a/bot/exts/help_channels/_message.py
+++ b/bot/exts/help_channels/_message.py
@@ -29,15 +29,15 @@ AVAILABLE_TITLE = "Available help channel"
AVAILABLE_FOOTER = "Closes after a period of inactivity, or when you send !close."
-DORMANT_MSG = """
-This help channel has been marked as **dormant**, and has been moved into the **{dormant}** \
+DORMANT_MSG = f"""
+This help channel has been marked as **dormant**, and has been moved into the **{{dormant}}** \
category at the bottom of the channel list. It is no longer possible to send messages in this \
channel until it becomes available again.
If your question wasn't answered yet, you can claim a new help channel from the \
-**{available}** category by simply asking your question again. Consider rephrasing the \
+**{{available}}** category by simply asking your question again. Consider rephrasing the \
question to maximize your chance of getting a good answer. If you're not sure how, have a look \
-through our guide for **[asking a good question]({asking_guide})**.
+through our guide for **[asking a good question]({ASKING_GUIDE_URL})**.
"""