discord

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Discord (Via
message
)

Discord(通过
message
工具)

Use the
message
tool. No provider-specific
discord
tool exposed to the agent.
使用
message
工具,没有专属的Discord工具暴露给Agent。

Musts

强制要求

  • Always:
    channel: "discord"
    .
  • Respect gating:
    channels.discord.actions.*
    (some default off:
    roles
    ,
    moderation
    ,
    presence
    ,
    channels
    ).
  • Prefer explicit ids:
    guildId
    ,
    channelId
    ,
    messageId
    ,
    userId
    .
  • Multi-account: optional
    accountId
    .
  • 必须携带参数:
    channel: "discord"
  • 遵守权限管控规则:
    channels.discord.actions.*
    (部分权限默认关闭:
    roles
    moderation
    presence
    channels
  • 优先使用明确ID参数:
    guildId
    channelId
    messageId
    userId
  • 多账户场景可选携带
    accountId
    参数

Guidelines

使用指南

  • Avoid Markdown tables in outbound Discord messages.
  • Mention users as
    <@USER_ID>
    .
  • Prefer Discord components v2 (
    components
    ) for rich UI; use legacy
    embeds
    only when you must.
  • 外发的Discord消息中避免使用Markdown表格
  • 提及用户时使用
    <@USER_ID>
    格式
  • 富UI场景优先使用Discord components v2(
    components
    );仅在必要时使用传统
    embeds

Targets

目标参数规则

  • Send-like actions:
    to: "channel:<id>"
    or
    to: "user:<id>"
    .
  • Message-specific actions:
    channelId: "<id>"
    (or
    to
    ) +
    messageId: "<id>"
    .
  • 发送类操作:
    to: "channel:<id>"
    to: "user:<id>"
  • 特定消息相关操作:
    channelId: "<id>"
    (或
    to
    参数) +
    messageId: "<id>"

Common Actions (Examples)

常用操作(示例)

Send message:
json
{
  "action": "send",
  "channel": "discord",
  "to": "channel:123",
  "message": "hello",
  "silent": true
}
Send with media:
json
{
  "action": "send",
  "channel": "discord",
  "to": "channel:123",
  "message": "see attachment",
  "media": "file:///tmp/example.png"
}
  • Optional
    silent: true
    to suppress Discord notifications.
Send with components v2 (recommended for rich UI):
json
{
  "action": "send",
  "channel": "discord",
  "to": "channel:123",
  "message": "Status update",
  "components": "[Carbon v2 components]"
}
  • components
    expects Carbon component instances (Container, TextDisplay, etc.) from JS/TS integrations.
  • Do not combine
    components
    with
    embeds
    (Discord rejects v2 + embeds).
Legacy embeds (not recommended):
json
{
  "action": "send",
  "channel": "discord",
  "to": "channel:123",
  "message": "Status update",
  "embeds": [{ "title": "Legacy", "description": "Embeds are legacy." }]
}
  • embeds
    are ignored when components v2 are present.
React:
json
{
  "action": "react",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456",
  "emoji": "✅"
}
Read:
json
{
  "action": "read",
  "channel": "discord",
  "to": "channel:123",
  "limit": 20
}
Edit / delete:
json
{
  "action": "edit",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456",
  "message": "fixed typo"
}
json
{
  "action": "delete",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456"
}
Poll:
json
{
  "action": "poll",
  "channel": "discord",
  "to": "channel:123",
  "pollQuestion": "Lunch?",
  "pollOption": ["Pizza", "Sushi", "Salad"],
  "pollMulti": false,
  "pollDurationHours": 24
}
Pins:
json
{
  "action": "pin",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456"
}
Threads:
json
{
  "action": "thread-create",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456",
  "threadName": "bug triage"
}
Search:
json
{
  "action": "search",
  "channel": "discord",
  "guildId": "999",
  "query": "release notes",
  "channelIds": ["123", "456"],
  "limit": 10
}
Presence (often gated):
json
{
  "action": "set-presence",
  "channel": "discord",
  "activityType": "playing",
  "activityName": "with fire",
  "status": "online"
}
发送消息:
json
{
  "action": "send",
  "channel": "discord",
  "to": "channel:123",
  "message": "hello",
  "silent": true
}
带媒体发送:
json
{
  "action": "send",
  "channel": "discord",
  "to": "channel:123",
  "message": "see attachment",
  "media": "file:///tmp/example.png"
}
  • 可选携带
    silent: true
    关闭Discord通知。
使用components v2发送(富UI推荐方案):
json
{
  "action": "send",
  "channel": "discord",
  "to": "channel:123",
  "message": "Status update",
  "components": "[Carbon v2 components]"
}
  • components
    参数接收来自JS/TS集成的Carbon组件实例(Container、TextDisplay等)
  • 不要同时使用
    components
    embeds
    (Discord会拒绝v2组件+embeds的组合请求)
传统embeds(不推荐):
json
{
  "action": "send",
  "channel": "discord",
  "to": "channel:123",
  "message": "Status update",
  "embeds": [{ "title": "Legacy", "description": "Embeds are legacy." }]
}
  • 当存在v2 components时,
    embeds
    参数会被忽略。
表情回应:
json
{
  "action": "react",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456",
  "emoji": "✅"
}
读取消息:
json
{
  "action": "read",
  "channel": "discord",
  "to": "channel:123",
  "limit": 20
}
编辑 / 删除消息:
json
{
  "action": "edit",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456",
  "message": "fixed typo"
}
json
{
  "action": "delete",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456"
}
发起投票:
json
{
  "action": "poll",
  "channel": "discord",
  "to": "channel:123",
  "pollQuestion": "Lunch?",
  "pollOption": ["Pizza", "Sushi", "Salad"],
  "pollMulti": false,
  "pollDurationHours": 24
}
消息置顶:
json
{
  "action": "pin",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456"
}
创建线程:
json
{
  "action": "thread-create",
  "channel": "discord",
  "channelId": "123",
  "messageId": "456",
  "threadName": "bug triage"
}
消息搜索:
json
{
  "action": "search",
  "channel": "discord",
  "guildId": "999",
  "query": "release notes",
  "channelIds": ["123", "456"],
  "limit": 10
}
状态设置(通常受权限管控):
json
{
  "action": "set-presence",
  "channel": "discord",
  "activityType": "playing",
  "activityName": "with fire",
  "status": "online"
}

Writing Style (Discord)

Discord内容写作规范

  • Short, conversational, low ceremony.
  • No markdown tables.
  • Mention users as
    <@USER_ID>
    .
  • 简短、口语化、无需过于正式
  • 不要使用Markdown表格
  • 提及用户时使用
    <@USER_ID>
    格式