如何嵌入回复?不和谐机器人 Python

时间:2021-04-15 22:02:47

标签: python discord bots

这是我拥有的代码,我想知道如何制作它以便机器人嵌入需求。

@client.command()
async def partner(ctx):
    await ctx.send("""__Requirements:__
1)
2)
    """)

1 个答案:

答案 0 :(得分:0)

这里:

@client.command()
async def partner(ctx):
  embed = discord.Embed(title="Requirements:")
  embed.add_field(name="(1) Title", value="Body 1", inline=False)
  embed.add_field(name="(2) Title", value="Body 2", inline=False)
  await ctx.send(embed=embed)