【问题标题】:Embed images not loading in discord python嵌入图像未在不和谐 python 中加载
【发布时间】:2020-08-26 21:11:50
【问题描述】:

我的不和谐机器人应该在命令“tsun!kill”上发送嵌入图像,我正在使用以下代码:

@commands.command()
    async def kill(self, ctx, member: discord.Member = None):
        if member == None:
            embed = discord.Embed(title= "Kill who?")
            embed.set_image(url="https://tenor.com/view/go-to-sleep-gif-13374919")
            await ctx.send(embed = embed)

一切正常,但图像永远不会加载: Screenshot

但是,如果使用通常的 ctx.send() 发送链接,则预览会完美加载。

【问题讨论】:

    标签: python discord discord.py-rewrite


    【解决方案1】:

    你需要使用到实际图片的链接,如下:

    embed.set_image(url="https://media.tenor.com/images/cb37de2f54039535426738c62136d0e3/tenor.gif")
    

    【讨论】:

      猜你喜欢
      • 2021-05-14
      • 1970-01-01
      • 2020-11-18
      • 2020-11-12
      • 2019-02-12
      • 2019-10-11
      • 2021-12-01
      • 2020-10-17
      • 1970-01-01
      相关资源
      最近更新 更多