简体   繁体   English

如何在嵌入 discord.py 中使用 markdown 语法发送图像

[英]How can i send an image using markdown syntax in an embed discord.py

I have this code to display my project's status:我有这段代码来显示我的项目状态:

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

But it doesn't display images when i send it: picture但是当我发送它时它不显示图像:图片

How could i send markdown images?我怎么能发送 markdown 图片?

There are only 4 possible locations to add an image to your embed.只有 4 个可能的位置可以将图像添加到您的嵌入中。

在此处输入图像描述

You might consider adding the photos as emojis in your guild and the use them as follows您可以考虑在您的公会中将照片添加为表情符号,并按如下方式使用它们

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM