【问题标题】:How do I embed a response? Discord Bot Python如何嵌入响应?不和谐机器人 Python
【发布时间】:2021-04-16 06:20:18
【问题描述】:

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

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

【问题讨论】:

    标签: python discord bots


    【解决方案1】:

    这里:

    @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)
    

    【讨论】:

    • 有没有办法改变嵌入的颜色?
    • discord.Embed(..., color=0x00ff00)
    猜你喜欢
    • 2021-07-07
    • 2018-06-27
    • 2019-04-11
    • 2019-04-13
    • 2021-06-17
    • 2021-08-07
    • 2020-12-25
    • 2021-01-21
    • 1970-01-01
    相关资源
    最近更新 更多