diff options
| author | 2021-11-06 23:02:26 -0400 | |
|---|---|---|
| committer | 2021-11-06 23:02:26 -0400 | |
| commit | 7227fe279574ee0626ad6c7ead754c1212669af2 (patch) | |
| tree | 2a6a2a9c23c5ab1dced2d4f6c2a22ec72301cc7e /bot/exts/utilities | |
| parent | lowering challenges for compatibility with uppercase languages (diff) | |
Change language to language.lower()
Diffstat (limited to 'bot/exts/utilities')
| -rw-r--r-- | bot/exts/utilities/challenges.py | 6 | 
1 files changed, 4 insertions, 2 deletions
| 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 <language> <query>, <difficulty>` - 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: | 
