[Python] discord.py - discord.errors.HTTPException: 400 Bad Request (error code: 50035): -...

Discussão em 'Python' iniciado por Stack, Outubro 4, 2024.

  1. Stack

    Stack Membro Participativo

    msg = discord.Embed(
    title = country_name + ' Coronavirus cases',
    colour = discord.Colour.blue(),


    )
    msg.set_thumbnail(url='https://www.worldometers.info/img/flags/'+ country_code +'-flag.gif')
    msg.add_field(name='**Total Cases**', value = total_cases, inline = False)
    msg.add_field(name='**Deaths**', value = total_deaths, inline = False)
    msg.add_field(name='**Recovered**', value = total_recovered, inline = False)
    await message.channel.send(embed=msg)


    Error:

    discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
    In embed.fields.1.value: This field is required


    I got the error, looked it up and it said something along the lines of 'this happens when there is more than 2000 characters', my message is less than 100. My code grabs data from a website and sends it through an embedded message on discord. Any help or suggestions are helpful.

    Continue reading...

Compartilhe esta Página