Post On Discord Channel

向 Discord 频道发送消息,支持 Markdown 格式、嵌入内容、文件附件及提及控制。适用于需要自动发信的场景。

已扫描
适合谁
需要自动化运营 Discord 社区的管理员、使用 AI 工作流集成 Discord 通知的开发者
不适合谁
无 Discord 管理权限的普通用户、希望直接在本地运行脚本而不通过 API 的用户
国内可用性
需网络配置。可能需要网络配置或第三方服务可访问。
安装难度
新手友好(★☆☆)。基于终端操作、依赖、API Key 和本地环境要求的初步判断。

安装与下载

openclaw skills install @agentpmt/post-on-discord-channel

Skill 说明

命令、参数、文件名以原文为准

Post On Discord Channel

新鲜度

最后更新时间:2026-06-10

如果当前日期距离上次更新已超过 7 天,请在使用端点、模式、设置步骤或示例前,从 skills.sh 或 ClawHub 重新安装此技能。

该工具的功能

Discord Webhook 工具使 AI 代理能够通过 webhook URL 直接向 Discord 频道发送格式丰富、排版精美的消息。支持带完整 Discord markdown 格式的文本消息、自定义用户名和头像覆盖、以及包含标题、描述、字段、颜色、图片和时间戳的丰富嵌入内容。每个消息最多可上传 10 个文件,使用 base64 编码,并通过 attachment:// 语法在嵌入中引用,实现图片的无缝显示。高级功能包括提及控制(用于管理用户/角色提醒)、文本转语音能力,以及单条消息中最多支持 10 个嵌入,适用于复杂的通知场景。非常适合自动化工作流、监控系统、聊天机器人集成和需要格式化 Discord 输出的通知管道。

产品说明

发送消息到 Discord 频道 - 使用说明

概述

通过 webhook 向 Discord 频道发送消息、丰富嵌入和文件附件。支持带 Discord markdown 的文本消息,每条消息最多 10 个嵌入,最多 10 个文件附件,自定义机器人身份(用户名/头像),文本转语音功能,以及提及控制。

动作

send

使用 webhook URL 向 Discord 频道发送一条消息。必须提供 contentembedsfiles 中至少一个。

必填字段:

  • action — 设置为 "send"
  • webhook_url — Discord webhook URL,格式为 https://discord.com/api/webhooks/{webhook_id}/{webhook_token}

可选字段:

  • content (字符串,最大 2000 字符) — 消息正文。支持 Discord markdown 格式。
  • username (字符串,最大 80 字符) — 覆盖默认 webhook 显示名称。
  • avatar_url (字符串) — 使用自定义图像 URL 覆盖默认 webhook 头像。
  • tts (布尔值,默认为 false) — 启用消息的文本转语音功能。
  • embeds (数组,最多 10 个) — 丰富嵌入对象数组(详见下方嵌入结构)。
  • files (数组,最多 10 个) — 文件附件对象数组(详见下方文件结构)。
  • allowed_mentions (对象) — 控制哪些提及可以触发用户/角色提醒(详见提及控制部分)。
嵌入结构

每个嵌入对象支持以下字段:

  • title (字符串,最大 256 字符) — 嵌入标题。
  • description (字符串,最大 4096 字符) — 嵌入正文。支持 Discord markdown。
  • url (字符串) — 标题链接的目标地址。
  • color (整数) — 十进制颜色值。例如:蓝色 = 39423,红色 = 16711680,绿色 = 65280。
  • author (对象) — 作者区块,需包含 name,可选 urlicon_url
  • fields (数组,最多 25 个) — 字段对象数组,每个字段需包含 namevalue(分别最大 256/1024 字符),可选 inline(布尔值)。
  • thumbnail (对象) — 缩略图(位于右上角),需包含 url
  • image (对象) — 内容下方的大图,需包含 url
  • footer (对象) — 页脚,需包含 text(最大 2048 字符,不支持 markdown),可选 icon_url
  • timestamp (字符串) — ISO 8601 时间戳,显示在页脚,例如 "2026-03-09T12:00:00Z"
文件结构

每个文件对象需包含:

  • filename (字符串) — 带扩展名的文件名,例如 "report.pdf"
  • content (字符串) — Base64 编码的文件内容。
  • description (字符串,可选) — 附件的描述信息。
提及控制

allowed_mentions 对象用于控制提醒行为:

  • parse (数组) — 允许的提及类型:"roles""users""everyone"
  • roles (数组) — 允许被提及的具体角色 ID 列表。
  • users (数组) — 允许被提及的具体用户 ID 列表。

示例

简单文本消息
{
  "action": "send",
  "webhook_url": "https://discord.com/api/webhooks/123456789/abcdef",
  "content": "Hello from the bot!"
}
自定义机器人身份
{
  "action": "send",
  "webhook_url": "https://discord.com/api/webhooks/123456789/abcdef",
  "content": "Status update: all systems operational.",
  "username": "Status Bot",
  "avatar_url": "https://example.com/bot-avatar.png"
}
带字段的丰富嵌入
{
  "action": "send",
  "webhook_url": "https://discord.com/api/webhooks/123456789/abcdef",
  "embeds": [
    {
      "title": "Daily Sales Report",
      "description": "Summary for March 9, 2026",
      "color": 39423,
      "fields": [
        { "name": "Total Revenue", "value": "$12,450", "inline": true },
        { "name": "Orders", "value": "87", "inline": true },
        { "name": "Top Product", "value": "Widget Pro", "inline": false }
      ],
      "footer": { "text": "Generated automatically" },
      "timestamp": "2026-03-09T17:00:00Z"
    }
  ]
}
带图片和作者的嵌入
{
  "action": "send",
  "webhook_url": "https://discord.com/api/webhooks/123456789/abcdef",
  "embeds": [
    {
      "title": "New Blog Post Published",
      "url": "https://example.com/blog/new-post",
      "description": "Check out our latest article on automation best practices.",
      "color": 65280,
      "author": {
        "name": "Content Team",
        "icon_url": "https://example.com/team-icon.png"
      },
      "image": { "url": "https://example.com/blog-banner.png" },
      "thumbnail": { "url": "https://example.com/logo-small.png" }
    }
  ]
}
文件附件
{
  "action": "send",
  "webhook_url": "https://discord.com/api/webhooks/123456789/abcdef",
  "content": "Here is the report you requested.",
  "files": [
    {
      "filename": "report.csv",
      "content": "bmFtZSxhZ2UKSm9obiwyNQpKYW5lLDMw",
      "description": "Monthly sales data"
    }
  ]
}
带提及控制的消息
{
  "action": "send",
  "webhook_url": "https://discord.com/api/webhooks/123456789/abcdef",
  "content": "Hey @admin, the system is ready.",
  "allowed_mentions": {
    "parse": ["users"],
    "users": ["123456789012345678"]
  }
}
{
  "action": "send",
  "webhook_url": "https://discord.com/api/webhooks/123456789/abcdef",
  "content": "Attention @everyone: server maintenance at 10 PM.",
  "allowed_mentions": {
    "parse": ["everyone"]
  }
}

常见工作流

  1. 自动化通知 — 通过简单文本消息,将监控系统、CI/CD 流水线或定时任务的告警发送到 Discord 频道。
  2. 格式化报告 — 使用带字段、颜色和时间戳的嵌入内容(embeds),传递结构化数据,如每日摘要、分析结果或仪表盘信息。
  3. 文件分发 — 使用 base64 编码的文件内容,将生成的报告(CSV、PDF、图片等)直接作为附件发送至 Discord 消息。
  4. 多频道广播 — 通过为每个 webhook URL 调用一次该工具,实现向多个频道发送相同消息。

重要注意事项

  • 每次发送请求中,必须提供 contentembedsfiles 中至少一项。
  • webhook_url 必须符合 Discord webhook 的 URL 格式。可在 Discord 中通过「频道设置 > 集成 > Webhooks」创建。
  • 嵌入内容的颜色必须为十进制整数,而非十六进制字符串。例如:0x0099FF 对应十进制值 39423
  • 文件内容必须为有效的 base64 编码数据。
  • Discord 限制:content 最大 2000 字符,每条消息最多 10 个嵌入内容,每个嵌入最多 25 个字段,每条消息最多支持 10 个文件。
  • tts(文本转语音)选项将使消息被朗读给频道中的用户。

适用场景

  • 在 AgentPMT 上使用「Post On Discord Channel」技能。
  • 当代理需要使用此特定工具的行为、模式、输入输出及调用结构时。
  • 搜索与激活关键词:在 Discord 频道发布、新产品功能上线时通知社区、提醒频道关注者即将到来的活动、通知用户支持工单请求、集成内容发布流程、发送、webhook url、内容。

支持的操作名称

send

使用案例

  • 新产品功能上线时通知社区
  • 提醒频道关注者即将举行的活动
  • 通知用户支持工单已提交
  • 与内容发布流程集成

分类与行业

本工具未公开分类或行业标签。

操作与模式

完整生成的操作模式:./schema.md

支持的操作数量:1

x402 可用性:此产品未启用。

  • send(操作别名:send):通过 webhook 将消息发送至 Discord 频道。支持文本内容(含 Discord Markdown)、富嵌入内容(embeds)、文件附件、自定义机器人身份、文本转语音(TTS)以及提及控制。至少需提供 contentembedsfiles 中的一项。费用:3 积分。参数:allowed_mentionsavatar_urlcontentembedsfilesttsusernamewebhook_url

实时模式与示例

建议在常规调用中使用上述紧凑模式。若涉及新生产环境集成,或参数、枚举值、嵌套对象、输出结果或示例不明确时,请优先获取实时详情。

  • 获取精确模式:调用 agentpmt-tool-search-and-execution,参数为 action: "get_schema"tool_id: "post-on-discord-channel"
  • 获取详细示例:调用 agentpmt-tool-search-and-execution,参数为 action: "get_instructions"tool_id: "post-on-discord-channel";或在已选择该工具产品后,直接调用 action: "get_instructions"
  • 请以返回的实时模式和说明为准,其优先级高于本生成摘要。

通过主 AgentPMT MCP 服务器查询 MCP 模式:

{
  "method": "tools/call",
  "params": {
    "name": "AgentPMT-Tool-Search-and-Execution",
    "arguments": {
      "action": "get_schema",
      "tool_id": "post-on-discord-channel"
    }
  }
}

获取实时示例时,使用相同 MCP 工具并采用以下参数:

{
  "action": "get_instructions",
  "tool_id": "post-on-discord-channel"
}

通过认证的 AgentPMT REST API 查询模式请求体:

{
  "name": "agentpmt-tool-search-and-execution",
  "parameters": {
    "action": "get_schema",
    "tool_id": "post-on-discord-channel"
  }
}

通过认证的 AgentPMT REST API 获取实时示例请求体:

{
  "name": "agentpmt-tool-search-and-execution",
  "parameters": {
    "action": "get_instructions",
    "tool_id": "post-on-discord-channel"
  }
}

调用此工具

产品别名:post-on-discord-channel

市场页面:https://www.agentpmt.com/marketplace/post-on-discord-channel

  • AgentPMT 账户路径:首次使用前,请先运行 ../agentpmt-account-mcp-rest-api-setup,连接主 MCP 服务器或 REST API,确保该工具在所属 Agent Group 中已启用。
  • x402 路径:此产品未启用。
  • AgentPMT 概览:参见 ../what-is-agentpmt,了解市场、Agent Group、工作流、MCP、REST 及支付相关概念。

若未安装本产品的前置依赖技能,请使用下方下载方式。

核心 AgentPMT 设置技能:

  • 什么是 AgentPMT:../what-is-agentpmt

- ClawHub 页面:https://clawhub.ai/agentpmt/what-is-agentpmt

- OpenClaw 安装命令:openclaw skills install what-is-agentpmt

- skills.sh 安装命令:npx skills add AgentPMT/agent-skills --skill what-is-agentpmt

  • AgentPMT 账户 MCP/REST 设置:../agentpmt-account-mcp-rest-api-setup

- ClawHub 页面:https://clawhub.ai/agentpmt/agentpmt-account-mcp-rest-api-setup

- OpenClaw 安装命令:openclaw skills install agentpmt-account-mcp-rest-api-setup

- skills.sh 安装命令:npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup

skills.sh 安装脚本:

npx skills add AgentPMT/agent-skills --skill what-is-agentpmt
npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup

主 AgentPMT MCP 服务器连接后,调用格式如下:


name: Post On Discord Channel

version: 1.0.0

description: 通过 Webhook 向 Discord 频道发送消息,支持文本、嵌入内容、文件和自定义用户名/头像。

summary: 使用指定的 Webhook URL 向 Discord 频道发送消息,可包含富媒体内容与附件。

参数说明

参数类型必填说明
actionstring操作类型,当前仅支持 send
webhook_urlstringDiscord Webhook 的 URL,用于发送消息。
contentstring消息正文内容(纯文本)。
usernamestring发送消息时使用的自定义用户名。
avatar_urlstring发送消息时使用的自定义头像图片链接。
ttsboolean是否启用文本转语音(TTS)功能,默认为 false
allowed_mentionsobject指定消息中允许提及的对象。
embedsarray of objects一个或多个嵌入内容(Embed),用于美化消息展示。
filesarray of objects附加的文件列表,每个文件包含内容、描述和文件名。

allowed_mentions 子参数

参数类型说明
parsearray of strings指定解析哪些类型的提及,如 rolesuserseveryone
rolesarray of strings允许提及的角色名称列表。
usersarray of strings允许提及的用户名称列表。

embeds 子结构

字段类型说明
authorobject消息作者信息,包含图标、名称和链接。
colorinteger嵌入内容的标题栏颜色(十六进制值,如 0x00FF00)。
descriptionstring嵌入内容的主体描述。
fieldsarray of objects一组键值对字段,用于展示额外信息。
footerobject消息底部信息,通常显示时间或来源。
imageobject主图链接,用于展示大图。
thumbnailobject缩略图链接,用于小图预览。
timestampstringISO8601 时间戳,用于在消息中显示时间。

fields 子结构

字段类型说明
namestring字段名称。
valuestring字段值。
inlineboolean是否以行内方式显示(默认 false)。
字段类型说明
namestring显示名称。
urlstring可点击链接。
icon_urlstring图标图片链接。

files 子结构

字段类型说明
filenamestring文件名。
contentstring文件内容(文本)。
descriptionstring文件描述(可选)。

使用示例

{
  "name": "post-on-discord-channel",
  "parameters": {
    "action": "send",
    "webhook_url": "https://discord.com/api/webhooks/1234567890/abc123xyz",
    "username": "Marketing Bot",
    "avatar_url": "https://example.com/logo.png",
    "content": "Draft marketing copy to check for banned phrases.",
    "tts": false,
    "allowed_mentions": {
      "parse": ["roles"],
      "roles": ["marketing-team"],
      "users": ["alice"]
    },
    "embeds": [
      {
        "author": {
          "name": "Example Name",
          "url": "https://example.com",
          "icon_url": "https://example.com/icon.png"
        },
        "color": 1,
        "description": "This is an example description.",
        "fields": [
          {
            "name": "Example Field",
            "value": "Example Value",
            "inline": false
          }
        ],
        "footer": {
          "text": "Example Footer Text",
          "icon_url": "https://example.com/footer-icon.png"
        },
        "image": {
          "url": "https://example.com/image.png"
        },
        "thumbnail": {
          "url": "https://example.com/thumbnail.png"
        },
        "timestamp": "2025-04-05T10:00:00Z"
      }
    ],
    "files": [
      {
        "filename": "marketing_draft.txt",
        "content": "Draft marketing copy to check for banned phrases.",
        "description": "Initial draft for review."
      }
    ]
  }
}

响应处理

  • 将返回的 JSON 视为本次调用的唯一真实依据。
  • 若响应中包含警告或修正目标,请在重试前应用这些修改。
  • 若响应包含 passed 或成功状态的布尔值,将其作为流程决策节点。
  • 若验证失败或响应结构不明确,应在重试前调用 get_schemaget_instructions 获取最新规范。
  • send 操作失败,应保留原始请求参数,并在修复架构、认证或支付问题后重新尝试。

安全注意事项

  • 禁止在提示词或日志中暴露账户密钥、钱包私钥、助记词、签名或支付相关头部信息。
  • 仅传递完成任务所需的最小化输入内容。
  • 使用 setup 技能管理凭证;本技能仅定义产品级行为逻辑。

AgentPMT 参考文档

  • 什么是 AgentPMT:[../what-is-agentpmt](https://clawhub.ai/agentpmt/what-is-agentpmt)

(ClawHub: what-is-agentpmt,skills.sh: npx skills add AgentPMT/agent-skills --skill what-is-agentpmt

  • AgentPMT 账户 MCP/REST 设置指南:[../agentpmt-account-mcp-rest-api-setup](https://clawhub.ai/agentpmt/agentpmt-account-mcp-rest-api-setup)

(ClawHub: agentpmt-account-mcp-rest-api-setup,skills.sh: npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup

  • 市场商品页面:[https://www.agentpmt.com/marketplace/post-on-discord-channel](https://www.agentpmt.com/marketplace/post-on-discord-channel)
  • AgentPMT 主 MCP 服务器地址:[https://api.agentpmt.com/mcp/](https://api.agentpmt.com/mcp/)
  • AgentPMT REST 调用端点:[https://api.agentpmt.com/products/purchase](https://api.agentpmt.com/products/purchase)
A
@agentpmt

已收录 2 个 Skill

相关推荐