From 99ffe92dee79f4884bde4c086b2a8dc853684861 Mon Sep 17 00:00:00 2001 From: Gustav Odinger Date: Mon, 16 Nov 2020 01:10:20 +0100 Subject: Add bright green color to constants - The color is used in the new help channel embed --- bot/constants.py | 1 + config-default.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/bot/constants.py b/bot/constants.py index 731f06fed..719895567 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): diff --git a/config-default.yml b/config-default.yml index 8912841ff..cdcf914ce 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>" -- cgit v1.2.3 From 6db37138c5cd6927477bd936f9009501138baa9e Mon Sep 17 00:00:00 2001 From: Gustav Odinger Date: Mon, 16 Nov 2020 01:12:08 +0100 Subject: Update help channel available message - Adds a footer and title - Uses a green colored embed - Updates message to be easier to read and contain practical info for asking better questions --- bot/exts/help_channels.py | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/bot/exts/help_channels.py b/bot/exts/help_channels.py index 062d4fcfe..3fbffb218 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. We’ll 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 one. + +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 \ @@ -837,7 +841,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( + title=AVAILABLE_TITLE, + color=constants.Colours.bright_green, + description=AVAILABLE_MSG, + ) + embed.set_footer(text=AVAILABLE_FOOTER) msg = await self.get_last_message(channel) if self.match_bot_embed(msg, DORMANT_MSG): -- cgit v1.2.3 From 43e52d7102c2bf33186b527dc512566d08b0d1fd Mon Sep 17 00:00:00 2001 From: Gustav Odinger Date: Tue, 17 Nov 2020 23:03:11 +0100 Subject: Add green-checkmark to bot constants --- bot/constants.py | 2 ++ config-default.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/bot/constants.py b/bot/constants.py index 719895567..d2e88a744 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -355,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/config-default.yml b/config-default.yml index cdcf914ce..30b607f94 100644 --- a/config-default.yml +++ b/config-default.yml @@ -120,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 -- cgit v1.2.3 From 6a53035ce4aec0063ec333214e5b3e8bab66ba01 Mon Sep 17 00:00:00 2001 From: Gustav Odinger Date: Tue, 17 Nov 2020 23:04:31 +0100 Subject: Use author as the title of the embed - Allows the icon to be centered --- bot/exts/help_channels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/help_channels.py b/bot/exts/help_channels.py index 3fbffb218..37bc78b26 100644 --- a/bot/exts/help_channels.py +++ b/bot/exts/help_channels.py @@ -842,10 +842,10 @@ class HelpChannels(commands.Cog): log.trace(f"Sending available message in {channel_info}.") embed = discord.Embed( - title=AVAILABLE_TITLE, 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) -- cgit v1.2.3 From 1e9b22b52007b087e83b4ccf2ee11cc63b991de9 Mon Sep 17 00:00:00 2001 From: Gustav Odinger Date: Tue, 17 Nov 2020 23:06:03 +0100 Subject: Update available message to sound better - This replaces "one" with "any" - This is supposed to read better --- bot/exts/help_channels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/help_channels.py b/bot/exts/help_channels.py index 37bc78b26..056434020 100644 --- a/bot/exts/help_channels.py +++ b/bot/exts/help_channels.py @@ -34,7 +34,7 @@ This channel will be dedicated to answering your question only. We’ll try to a **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 one. +• 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})**. """ -- cgit v1.2.3 From b865efeb9bb802ed728232fd8848db6140afccfa Mon Sep 17 00:00:00 2001 From: Gustav Odinger <65498475+gustavwilliam@users.noreply.github.com> Date: Sat, 21 Nov 2020 00:00:40 +0100 Subject: Update available help channel embed message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - This changes "we'll try to help you" to say "others will try to help you" - Clarifies that the rest of the community is going to help — not some dedicated help/staff team --- bot/exts/help_channels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/help_channels.py b/bot/exts/help_channels.py index 056434020..3643b8643 100644 --- a/bot/exts/help_channels.py +++ b/bot/exts/help_channels.py @@ -29,7 +29,7 @@ This is a Python help channel. You can claim your own help channel in the Python AVAILABLE_MSG = f""" **Send your question here to claim the channel** -This channel will be dedicated to answering your question only. We’ll try to answer and help you solve the issue. +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. -- cgit v1.2.3 From 969beaf3e21407c08bbda1f6ec2f4e555728aa11 Mon Sep 17 00:00:00 2001 From: Gustav Odinger Date: Sat, 21 Nov 2020 00:33:26 +0100 Subject: Remove duplicate checkmark - This removes a duplicate checkmark from the title of the embed - The checkmark was left from the previous title system and wasn't removed in the change --- bot/exts/help_channels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/help_channels.py b/bot/exts/help_channels.py index 3643b8643..4b8679b8a 100644 --- a/bot/exts/help_channels.py +++ b/bot/exts/help_channels.py @@ -39,7 +39,7 @@ This channel will be dedicated to answering your question only. Others will try For more tips, check out our guide on **[asking good questions]({ASKING_GUIDE_URL})**. """ -AVAILABLE_TITLE = "✅ Available help channel" +AVAILABLE_TITLE = "Available help channel" AVAILABLE_FOOTER = f"Closes after {constants.HelpChannels.idle_minutes} minutes of inactivity or when you send !close." -- cgit v1.2.3