You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何为Discord Ticket Bot的消息添加GIF?

给Discord工单机器人的Embed添加GIF的解决方法

你之前用"img": "imgurl"没效果,是因为Discord的Embed规范里根本没有这个字段,得用官方规定的image或thumbnail字段来添加图片/GIF,而且这两个字段都需要是对象格式,里面用url属性指定GIF的链接。

两种添加方式

  • 要加全屏宽度的GIF,用image字段,结构:"image": {"url": "你的GIF直链"}
  • 要加右上角小缩略图,用thumbnail字段,结构:"thumbnail": {"url": "你的GIF直链"}

修改后的完整配置代码

{
  "embeds": {
    "openTicket": {
      "title": "Open a support ticket",
      "description": "Click on the button to start opening a ticket",
      "footer": { 
        "text": "test"
      },
      "image": {
        "url": "你的GIF链接地址"
      }
    },
    "ticketOpened": {
      "title": "Ticket CATEGORYNAME",
      "description": "A staff will reply you as soon as possible!",
      "footer": {
        "text": "test"
      },
      "thumbnail": {
        "url": "你的GIF链接地址"
      }
    },
    "ticketClosed": {
      "title": "Ticket closed",
      "description": "test",
      "image": {
        "url": "你的GIF链接地址"
      }
    },
    "ticketClosedDM": {
      "title": "Ticket closed",
      "description": "test",
      "footer": {
        "text": "test"
      },
      "image": {
        "url": "你的GIF链接地址"
      }
    }
  }
}

额外提醒

  1. 确保GIF链接是直接可访问的直链(比如后缀为.gif,不要用需要跳转的短链)
  2. 补全了你原代码里缺失的闭合括号,否则配置会触发语法报错

内容的提问来源于stack exchange,提问作者ealw

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.31 23:39:07