I am creating a bot command that allows the user to create nice looking embeds on the server.
@bot.command()
async def embed(ctx,title_str,text_str,url_str, feildname_list):
my_embed=discord.Embed(title=title_str, url=url_str, description=text_str, color=0xFF5733)
await ctx.send(embed=my_embed)
currently feildname_list
is unused.
what i'd like to do is to create a series of inline fields using the names from fieldname list, with an ascending integer in them.
like this:
Using the documentation I found this command
add_field(*, name, value, inline=True)
which works- but felt inelegant. It feels like there should be a way of adding the fields as a key word argument when I am creating my_embed- but i can't see one in the documentation. Is there such a way?
question from:
https://stackoverflow.com/questions/65924339/creating-a-discord-bot-command-that-responds-with-multiple-embed-fields 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…