aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Boris Muratov <[email protected]>2020-11-21 01:52:32 +0200
committerGravatar GitHub <[email protected]>2020-11-21 01:52:32 +0200
commit6779e0127e4d323c7c8eb0fdc5e2475ee7c76e4b (patch)
tree7666141f4ffda8acae03d2c0a654578c855981fb
parentMerge pull request #1293 from ks129/emojis-filter (diff)
parentMerge branch 'master' into help-channel-msg (diff)
Merge pull request #1287 from python-discord/help-channel-msg
Updated available help channel embed
-rw-r--r--bot/constants.py3
-rw-r--r--bot/exts/help_channels.py29
-rw-r--r--config-default.yml3
3 files changed, 25 insertions, 10 deletions
diff --git a/bot/constants.py b/bot/constants.py
index 2126b2b37..6bb6aacd2 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -248,6 +248,7 @@ class Colours(metaclass=YAMLGetter):
soft_red: int
soft_green: int
soft_orange: int
+ bright_green: int
class DuckPond(metaclass=YAMLGetter):
@@ -354,6 +355,8 @@ class Icons(metaclass=YAMLGetter):
voice_state_green: str
voice_state_red: str
+ green_checkmark: str
+
class CleanMessages(metaclass=YAMLGetter):
section = "bot"
diff --git a/bot/exts/help_channels.py b/bot/exts/help_channels.py
index f5a8b251b..ced2f72ef 100644
--- a/bot/exts/help_channels.py
+++ b/bot/exts/help_channels.py
@@ -28,17 +28,21 @@ This is a Python help channel. You can claim your own help channel in the Python
"""
AVAILABLE_MSG = f"""
-This help channel is now **available**, which means that you can claim it by simply typing your \
-question into it. Once claimed, the channel will move into the **Python Help: Occupied** category, \
-and will be yours until it has been inactive for {constants.HelpChannels.idle_minutes} minutes or \
-is closed manually with `!close`. When that happens, it will be set to **dormant** and moved into \
-the **Help: Dormant** category.
-
-Try to write the best question you can by providing a detailed description and telling us what \
-you've tried already. For more information on asking a good question, \
-check out our guide on **[asking good questions]({ASKING_GUIDE_URL})**.
+**Send your question here to claim the channel**
+This channel will be dedicated to answering your question only. Others will try to answer and help you solve the issue.
+
+**Keep in mind:**
+• It's always ok to just ask your question. You don't need permission.
+• Explain what you expect to happen and what actually happens.
+• Include a code sample and error message, if you got any.
+
+For more tips, check out our guide on **[asking good questions]({ASKING_GUIDE_URL})**.
"""
+AVAILABLE_TITLE = "Available help channel"
+
+AVAILABLE_FOOTER = f"Closes after {constants.HelpChannels.idle_minutes} minutes 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** \
category at the bottom of the channel list. It is no longer possible to send messages in this \
@@ -834,7 +838,12 @@ class HelpChannels(commands.Cog):
channel_info = f"#{channel} ({channel.id})"
log.trace(f"Sending available message in {channel_info}.")
- embed = discord.Embed(description=AVAILABLE_MSG)
+ embed = discord.Embed(
+ color=constants.Colours.bright_green,
+ description=AVAILABLE_MSG,
+ )
+ embed.set_author(name=AVAILABLE_TITLE, icon_url=constants.Icons.green_checkmark)
+ embed.set_footer(text=AVAILABLE_FOOTER)
msg = await self.get_last_message(channel)
if self.match_bot_embed(msg, DORMANT_MSG):
diff --git a/config-default.yml b/config-default.yml
index 89493c4de..60eb437af 100644
--- a/config-default.yml
+++ b/config-default.yml
@@ -27,6 +27,7 @@ style:
soft_red: 0xcd6d6d
soft_green: 0x68c290
soft_orange: 0xf9cb54
+ bright_green: 0x01d277
emojis:
defcon_disabled: "<:defcondisabled:470326273952972810>"
@@ -119,6 +120,8 @@ style:
voice_state_green: "https://cdn.discordapp.com/emojis/656899770094452754.png"
voice_state_red: "https://cdn.discordapp.com/emojis/656899769905709076.png"
+ green_checkmark: "https://raw.githubusercontent.com/python-discord/branding/master/icons/checkmark/green-checkmark-dist.png"
+
guild:
id: 267624335836053506