aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/utilities/colour.py
diff options
context:
space:
mode:
authorGravatar bradtimmis <[email protected]>2021-11-09 20:39:39 -0500
committerGravatar bradtimmis <[email protected]>2021-11-09 20:39:39 -0500
commit1de5e9b905310eb4745b9b5c83561dea3a289ea9 (patch)
tree9f78476dca3f46ebed9cf56608088858ef538d15 /bot/exts/utilities/colour.py
parentbug: handle multi word name entries and full input (diff)
chore: pull hex match out of try/except block
Diffstat (limited to 'bot/exts/utilities/colour.py')
-rw-r--r--bot/exts/utilities/colour.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/utilities/colour.py b/bot/exts/utilities/colour.py
index cede3312..656dddba 100644
--- a/bot/exts/utilities/colour.py
+++ b/bot/exts/utilities/colour.py
@@ -228,10 +228,9 @@ class Colour(commands.Cog):
choices=self.colour_mapping.keys(),
score_cutoff=80
)
- hex_match = f"#{self.colour_mapping[match]}"
except (ValueError, TypeError):
raise commands.BadArgument(message=f"No color found for: `{input_colour_name}`")
- return hex_match
+ return f"#{self.colour_mapping[match]}"
def setup(bot: Bot) -> None: