首页 > 解决方案 > 如何在嵌入 discord.py 中使用 markdown 语法发送图像

问题描述

我有这段代码来显示我的项目状态:

def status(branch):
    embed=discord.Embed(title="Wng status", description=f"**On branch : {branch} :**\n\n- Windows : ![WinStatus](https://img.shields.io/github/workflow/status/Wmanage/wng/Rust/{branch})\n- *nix : ![WinStatus](https://img.shields.io/github/workflow/status/Wmanage/wng/RustUnix/{branch})", color=0xffaa00)
    embed.set_footer(text="w/status • Status of wng project")
    return embed

但是当我发送它时它不显示图像: 图片

我怎么能发送降价图像?

标签: pythonimagemarkdowndiscord.pyembed

解决方案


只有 4 个可能的位置可以将图像添加到您的嵌入中。

在此处输入图像描述

您可以考虑在公会中将照片添加为表情符号,并按如下方式使用它们

branch_emoji=discord.utils.get(ctx.guild.emojis, name="NAME_HERE")

推荐阅读