From 7227fe279574ee0626ad6c7ead754c1212669af2 Mon Sep 17 00:00:00 2001 From: Shom770 <82843611+Shom770@users.noreply.github.com> Date: Sat, 6 Nov 2021 23:02:26 -0400 Subject: Change language to language.lower() --- bot/exts/utilities/challenges.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bot/exts/utilities/challenges.py') diff --git a/bot/exts/utilities/challenges.py b/bot/exts/utilities/challenges.py index 1f296390..751ea2a3 100644 --- a/bot/exts/utilities/challenges.py +++ b/bot/exts/utilities/challenges.py @@ -275,10 +275,12 @@ class Challenges(commands.Cog): `.challenge , ` - Pulls a random challenge with the query provided, under that difficulty within the language's scope. """ - if language.lower() not in SUPPORTED_LANGUAGES["stable"] + SUPPORTED_LANGUAGES["beta"]: + + language = language.lower() + if language not in SUPPORTED_LANGUAGES["stable"] + SUPPORTED_LANGUAGES["beta"]: raise commands.BadArgument("This is not a recognized language on codewars.com!") - get_kata_link = f"https://codewars.com/kata/search/{language.lower()}" + get_kata_link = f"https://codewars.com/kata/search/{language}" params = {} if query is not None: -- cgit v1.2.3