简体   繁体   中英

How do I add multiple values to a field discord.py

Whenever I make a embed, the field can only contain one value. Im trying to make the embed like this. Flow music's help embed

I tried to use enter but it only appears in the code.

if message.content.startswith('embedtest'):
      embed=discord.Embed(title="Joe")
      embed.add_field(name="joe", value="**joe**-joe", inline=True)

This is the embed I was trying to change. Answer does not require to be the same embed, I just need an explanation for how to do it.

You can't make multiple values for one field, but you can just add multiple fields in one embed. One way to do this is like this:

YourEmbed = discord.Embed(title="Joe")
YourEmbed.add_field(name="joe3", value="joe1")
YourEmbed.add_field(name="joe4", value="joe2")

Note that the maximum number of fields on one embed is 25. Make sure to send the embed using ctx.send(embed=YourEmbed) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM