Discord 是做什麼的?
使用 channel: "discord" 搭配 message 工具。無需單獨的 Discord 工具。
規則
- 尊重
channels.discord.actions.*的權限閘門。 - 優先使用明確的
guildId、channelId、messageId、userId。 - 多帳戶:必要時傳遞
accountId。 - 傳送目標:
to: "channel:<id>"或to: "user:<id>"。 - 提及使用者請使用
<@USER_ID>。 - 在對外 Discord 訊息中避免使用 Markdown 表格。
- 偏好使用 Components v2 來建構豐富的 UI;請勿將 v2 的
components與舊式的embeds混用。
常見動作
傳送:
{ "action": "send", "channel": "discord", "to": "channel:123", "message": "你好", "silent": true }
傳送媒體:
{
"action": "send",
"channel": "discord",
"to": "channel:123",
"message": "請見附件",
"media": "file:///tmp/example.png"
}
Components v2:
{
"action": "send",
"channel": "discord",
"to": "channel:123",
"message": "狀態",
"components": "[Carbon v2 元件]"
}
表情反應:
{ "action": "react", "channel": "discord", "channelId": "123", "messageId": "456", "emoji": "👍" }
閱讀:
{ "action": "read", "channel": "discord", "to": "channel:123", "limit": 20 }
編輯/刪除:
{
"action": "edit",
"channel": "discord",
"channelId": "123",
"messageId": "456",
"message": "修正錯字"
}
{ "action": "delete", "channel": "discord", "channelId": "123", "messageId": "456" }
投票:
{
"action": "poll",
"channel": "discord",
"to": "channel:123",
"pollQuestion": "午餐吃什麼?",
"pollOption": ["披薩", "壽司"],
"pollDurationHours": 24
}
釘選:
{ "action": "pin", "channel": "discord", "channelId": "123", "messageId": "456" }
討論串:
{
"action": "thread-create",
"channel": "discord",
"channelId": "123",
"messageId": "456",
"threadName": "錯誤分類"
}
搜尋:
{
"action": "search",
"channel": "discord",
"guildId": "999",
"query": "版本發布說明",
"channelIds": ["123"],
"limit": 10
}
狀態設定(通常需要權限閘門):
{
"action": "set-presence",
"channel": "discord",
"activityType": "playing",
"activityName": "OpenClaw",
"status": "online"
}