用途
discord-chat 用于通过 Clawdbot 的消息工具与 Discord 频道进行交互,帮助用户发送消息、回复消息以及在频道中搜索历史记录。适用于用户希望在 Discord 中沟通、发布通知或查找历史内容时。
主要能力
发送消息
向指定 Discord 频道发送消息,可使用频道名称或频道 ID:
message action=send channel=discord target="#channel-name" message="Your message here"
message action=send channel=discord target="1234567890" message="Your message here"
要点:
- 使用带 # 前缀的频道名称或频道 ID
- 多个链接可用 <> 包裹以抑制嵌入预览:
<https://example.com> - 不支持 Markdown 表格,改用项目符号列表
- 支持效果参数,如
effect=balloons或effectId=invisible-ink
回复消息
回复指定消息,replyTo 参数会针对该消息 ID 创建话题式回复:
message action=send channel=discord target="#channel-name" message="Reply text" replyTo="message-id"
搜索消息
在频道中搜索消息:
message action=search channel=discord channelId="1234567890" query="search terms" limit=50
搜索选项:
- query:搜索词
- authorId:按作者筛选
- before/after/around:用于分页的消息 ID
- limit:最大结果数(默认 25)
高级搜索模式可参考 SEARCH.md。
其他操作
读取消息:
message action=read channel=discord target="#channel-name" limit=20
对消息添加表情回应:
message action=react channel=discord messageId="1234567890" emoji="👍"
编辑消息:
message action=edit channel=discord messageId="1234567890" message="Updated text"
删除消息:
message action=delete channel=discord messageId="1234567890"
频道管理
列出频道:
message action=channel-list channel=discord guildId="server-id"
获取频道信息:
message action=channel-info channel=discord channelId="1234567890"
创建或编辑频道的相关说明可参考 CHANNELS.md。
使用方式与常见模式
- 向频道发布公告:
action=send target="#announcements" - 在话题中回复:
action=send replyTo="msg-id" - 查看近期动态:
action=read limit=10 - 查找提及:
action=search query="@username" - 进行确认:
action=react emoji="✅"
最佳实践
- 尽量使用目标名称:
target="#general"比 ID 更清晰 - 批量回应时,一条消息只用一个表情,选择最合适的
- 遵循 Discord 格式:使用项目符号而非表格,用
<link>抑制嵌入 - 先搜索再询问:在请求信息前先查看历史记录
- 能用表情回应就少用回复:简单确认使用表情回应
配置
Discord 机器人配置应放在网关配置中。当指定 channel=discord 时,消息工具会自动路由到已配置的 Discord 插件。设置帮助可参考 CONFIG.md。
限制
资料未提供关于计费、可用平台、效果保证等信息,暂未提供。