Discord.py 嵌入链接

Discord.py Links in Embeds

我希望在嵌入的描述中向我的机器人发送邀请 link 作为 hyperlink。我希望它显示类似于 单击此处 的内容,然后引导至机器人的邀请 link。如果有人知道如何做到这一点,请告诉我,那就太好了! :)

像这样:[text to click](url)

注意:这不适用于标题页脚字段标题 , 如果你想在标题中使用超链接,请使用 url kwarg

你可以这样做:

 async def invite(ctx):
        embed = discord.Embed(
            color= discord.Colour.dark_teal() # or any color you want
        )
        embed.add_field(name='If you wish to add me in your server,' ,value='[Click here to add]( bot link )', inline=False)
        await ctx.send(embed=embed)

您可以仅在字段值中以这种方式放置超链接。