如何在discord的丰富嵌入中嵌入gif?像拥抱,亲吻,命令

2024-09-27 19:11:53 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用discord.py制作一个discord机器人,但我不知道如何在嵌入中发送GIF。我试图发出拥抱、亲吻、嘘声等命令。我该怎么做


          embed1 = discord.Embed(title="this is a title", description="this is a description!", color=0x00ff00,)
        await message.channel.send(embed = embed1)```

Tags: py命令titleis机器人embeddescriptionawait
1条回答
网友
1楼 · 发布于 2024-09-27 19:11:53

您可以使用set_image()函数向图像传递url,将嵌入图像设置为所需的图像

embed = discord.Embed(title="Title", description="Description", color=0x00ff00)
embed.add_field(name="Field1", value="test", inline=False)
embed.set_image(url="https://url-to-your-picture.gif")
await message.channel.send(embed=embed)

参考资料:

相关问题 更多 >

    热门问题