cant add lowercase text discord bot in python

Question:

I have a small code to use it in discord created in python and I have a small problem

The command is currently written in uppercase text and I would like it to be written in lowercase, if it is not written in lowercase the bot does not send the images to discord

he command is used:

!ubi ESTABLO ELEVADO

Should be used:

!ubi establo elevado

but in this case it does not work for me I have tried several codes and it does not work:

This is the code:

@bot.command()
async def ubi(ctx, *, args):
    response = requests.get('https://jose89fcb.es/apifortnite/api.io.php')
    data = response.json()
    for api in data['list']:
        if args in api["name"]:
            await ctx.send(f'{api["images"][0]["url"]}')
Asked By: juancarlos5487

||

Answers:

this is what you are looking for!

@bot.command()
    async def ubi(ctx, *, args):
        response = requests.get('https://jose89fcb.es/apifortnite/api.io.php')
        data = response.json()
        for api in data['list']:
            if args in api["name"].lower():
               
                await ctx.send(f'{api["images"][0]["url"]}')
Answered By: Peliculas Y Series
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.