From b2151ebc86a538b6e8eb492a2b10a7cd2c12f900 Mon Sep 17 00:00:00 2001 From: brad90four <42116429+brad90four@users.noreply.github.com> Date: Thu, 28 Oct 2021 09:01:57 -0400 Subject: chore: correct capitalization of command name in embed --- bot/exts/utilities/color.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bot') diff --git a/bot/exts/utilities/color.py b/bot/exts/utilities/color.py index e9e8dcf6..573039fa 100644 --- a/bot/exts/utilities/color.py +++ b/bot/exts/utilities/color.py @@ -28,9 +28,14 @@ class Colour(commands.Cog): r, g, b = rgb name = self._rgb_to_name(rgb) colour_mode = ctx.invoked_with - desc = f"{colour_mode.upper()} information for `{name or 'the input colour'}`." + colour_or_color = ctx.command.name + if colour_mode not in ("name", "hex", "random"): + colour_mode = colour_mode.upper() + else: + colour_mode = colour_mode.title() + desc = f"{colour_mode} information for `{name or 'the input colour'}`." colour_embed = Embed( - title="Colour", + title=colour_or_color.title(), description=desc, colour=int(f"{r:02x}{g:02x}{b:02x}", 16) ) -- cgit v1.2.3