2024-09-27 19:11:53 发布
网友
我正在使用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)```
您可以使用set_image()函数向图像传递url,将嵌入图像设置为所需的图像
set_image()
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)
参考资料:
您可以使用
set_image()
函数向图像传递url,将嵌入图像设置为所需的图像参考资料:
相关问题 更多 >
编程相关推荐