Discord Chat
Interact with Discord channels using Clawdbot's message tool.
Core Actions
Send Messages
Send a message to a Discord channel:
CODEBLOCK0
Or by channel ID:
CODEBLOCK1
Tips:
- Use channel names with # prefix or channel IDs For multiple links, wrap in <> to suppress embeds: INLINECODE3 No markdown tables! Use bullet lists instead Support effects with effect=balloons or INLINECODE5
Reply to Messages
Reply to a specific message:
CODEBLOCK2
The replyTo parameter creates a threaded reply to the specified message ID.
Search Messages
Search for messages in a channel:
CODEBLOCK3
Search options:
- query: Search terms INLINECODE8 : Filter by author INLINECODE9 /after/around: Message ID for pagination INLINECODE12 : Max results (default 25)
See SEARCH.md for advanced search patterns.
Other Actions
Read messages:
CODEBLOCK4
React to messages:
CODEBLOCK5
Edit messages:
CODEBLOCK6
Delete messages:
CODEBLOCK7
Quick Reference
Common patterns:
- Announce to channel : INLINECODE13 Reply in thread : INLINECODE14Recent activity : INLINECODE15Find mentions : INLINECODE16Acknowledge : INLINECODE17
Channel Management
List channels:
CODEBLOCK8
Get channel info:
CODEBLOCK9
For creating/editing channels, see CHANNELS.md .
Best Practices
1. Use target names when possible - target="#general" is clearer than IDs Batch reactions - One emoji per message, pick the best fitFormat for Discord - Bullets not tables, <link> to suppress embedsSearch before asking - Check history before requesting infoReact > Reply - Use reactions for simple acknowledgments
Configuration
Your Discord bot configuration should be in the gateway config. The message tool routes to the configured Discord plugin automatically when channel=discord is specified.
For setup help, see CONFIG.md .
Discord 聊天
使用 Clawdbot 的 message 工具与 Discord 频道进行交互。
核心操作
发送消息
向 Discord 频道发送消息:
bash
message action=send channel=discord target=#频道名称 message=在此输入消息
或通过频道 ID 发送:
bash
message action=send channel=discord target=1234567890 message=在此输入消息
提示:
- 使用带 # 前缀的频道名称或频道 ID 对于多个链接,用 <> 包裹以抑制嵌入: 不要使用 Markdown 表格!请改用项目符号列表 支持特效:effect=balloons 或 effectId=invisible-ink
回复消息
回复特定消息:
bash
message action=send channel=discord target=#频道名称 message=回复文本 replyTo=消息ID
replyTo 参数会创建对指定消息 ID 的线程回复。
搜索消息
在频道中搜索消息:
bash
message action=search channel=discord channelId=1234567890 query=搜索关键词 limit=50
搜索选项:
- query:搜索关键词 authorId:按作者筛选 before/after/around:用于分页的消息 ID limit:最大结果数(默认 25)
高级搜索模式请参阅 SEARCH.md 。
其他操作
读取消息:
bash
message action=read channel=discord target=#频道名称 limit=20
对消息做出反应:
bash
message action=react channel=discord messageId=1234567890 emoji=👍
编辑消息:
bash
message action=edit channel=discord messageId=1234567890 message=更新后的文本
删除消息:
bash
message action=delete channel=discord messageId=1234567890
快速参考
常用模式:
- 向频道公告 :action=send target=#公告 在线程中回复 :action=send replyTo=消息ID最近活动 :action=read limit=10查找提及 :action=search query=@用户名确认回应 :action=react emoji=✅
频道管理
列出频道:
bash
message action=channel-list channel=discord guildId=服务器ID
获取频道信息:
bash
message action=channel-info channel=discord channelId=1234567890
创建/编辑频道请参阅 CHANNELS.md 。
最佳实践
1. 尽可能使用目标名称 - target=#general 比 ID 更清晰 批量反应 - 每条消息一个表情符号,选择最合适的为 Discord 格式化 - 使用项目符号而非表格,用 抑制嵌入先搜索再提问 - 在请求信息前先查看历史记录反应优于回复 - 简单确认使用反应
配置
您的 Discord 机器人配置应位于网关配置中。当指定 channel=discord 时,message 工具会自动路由到已配置的 Discord 插件。
设置帮助请参阅 CONFIG.md 。