diff options
| author | 2021-08-11 13:24:45 +0100 | |
|---|---|---|
| committer | 2021-08-11 13:24:45 +0100 | |
| commit | d5ee28133f8e792526716b07d25cbf6e4faba3a1 (patch) | |
| tree | 8c4459f2f9b67f7b7bc6309e261736c20bdfc4ec | |
| parent | Merge pull request #1733 from python-discord/chore/vcokltfre/blocking-tag-new... (diff) | |
| parent | Fetch dormant category rather than use channel.category (diff) | |
Merge pull request #1738 from python-discord/dynamic-dormant-message
Make DORMANT_MSG Dynamic
| -rw-r--r-- | bot/exts/help_channels/_cog.py | 10 | ||||
| -rw-r--r-- | bot/exts/help_channels/_message.py | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/bot/exts/help_channels/_cog.py b/bot/exts/help_channels/_cog.py index 35658d117..afaf9b0bd 100644 --- a/bot/exts/help_channels/_cog.py +++ b/bot/exts/help_channels/_cog.py @@ -387,7 +387,15 @@ class HelpChannels(commands.Cog): ) log.trace(f"Sending dormant message for #{channel} ({channel.id}).") - embed = discord.Embed(description=_message.DORMANT_MSG) + 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 + ) + ) await channel.send(embed=embed) log.trace(f"Pushing #{channel} ({channel.id}) into the channel queue.") diff --git a/bot/exts/help_channels/_message.py b/bot/exts/help_channels/_message.py index befacd263..cf070be83 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 = f""" -This help channel has been marked as **dormant**, and has been moved into the **Help: Dormant** \ +DORMANT_MSG = """ +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 \ -**Help: 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_URL})**. +through our guide for **[asking a good question]({asking_guide})**. """ |