小编Lob*_*h67的帖子

使用本地文件作为嵌入 Discord.py 中的 set_thumbnail

我想发布一个带有缩略图的嵌入内容,以及我电脑上的本地文件。每当我尝试运行此代码时,图像都会发送到嵌入之外。

embedVar = discord.Embed(title="title",
                        description="desc.",
                         color=0X19A6FF)
file = discord.File("file_location/file.png", filename="image.png")
embedVar.set_thumbnail(url="attachment://file_location/file.png")
await message.channel.send(file=file, embed=embedVar)
Run Code Online (Sandbox Code Playgroud)

python embed image discord discord.py

4
推荐指数
1
解决办法
3990
查看次数

标签 统计

discord ×1

discord.py ×1

embed ×1

image ×1

python ×1