Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Discord.py Add embed Field without name attribute

I want to show a Leaderboard (Place, Name, Level) in an embed TextBox. The thing is, that I HAVE TO put name='smth' in the embed.add_field function, otherwise it wont work.

But if I do so, it looks like this: enter image description here

How can I delete these Titles?

My current code is

number = 0
for x in character_list:
    if number == 0:
        embed.add_field(name='Platz', value=x[0], inline=True)
        embed.add_field(name='Name', value=x[1], inline=True)
        embed.add_field(name='Level', value=x[2], inline=True)
        number = 1
    else:
        embed.add_field(name='', value=x[0], inline=True)
        embed.add_field(name='', value=x[1], inline=True)
        embed.add_field(name='', value=x[2], inline=True)
return await client.say(embed=embed)

I also tried using a fake space from utf-8 but then it looks ugly because instead of the white titles, there is just a space. I want to remove the line if its empty

like image 406
Luranis Avatar asked Dec 05 '22 13:12

Luranis


1 Answers

There's a zero-width whitespace character, \u200b that, if you set the field header text to, the embed will not render the field header.

like image 197
Chris Jones Avatar answered Dec 31 '22 13:12

Chris Jones