name: slack
description: 当你需要通过 slack 工具从 Clawdbot 控制 Slack 时使用,包括对消息添加反应或在 Slack 频道/私信中固定/取消固定项目。
使用 slack 工具可以对消息添加反应、管理固定项、发送/编辑/删除消息以及获取成员信息。该工具使用为 Clawdbot 配置的机器人令牌。
channelId 和 messageId (Slack 消息时间戳,例如 1712023032.1234)。emoji (Unicode 或 :名称: 格式)。to 目标 (channel:<id> 或 user:<id>) 和 content 内容。消息上下文行包含 slack message id 和 channel 字段,你可以直接复用这些信息。
| 操作分组 | 默认状态 | 说明 |
|---|---|---|
| reactions | 已启用 | 添加反应 + 列出反应 |
| messages | 已启用 | 读取/发送/编辑/删除消息 |
| pins | 已启用 | 固定/取消固定/列出固定项 |
| memberInfo | 已启用 | 成员信息 |
| emojiList | 已启用 | 自定义表情列表 |
{
"action": "react",
"channelId": "C123",
"messageId": "1712023032.1234",
"emoji": "✅"
}
{
"action": "reactions",
"channelId": "C123",
"messageId": "1712023032.1234"
}
{
"action": "sendMessage",
"to": "channel:C123",
"content": "Hello from Clawdbot"
}
{
"action": "editMessage",
"channelId": "C123",
"messageId": "1712023032.1234",
"content": "Updated text"
}
{
"action": "deleteMessage",
"channelId": "C123",
"messageId": "1712023032.1234"
}
{
"action": "readMessages",
"channelId": "C123",
"limit": 20
}
{
"action": "pinMessage",
"channelId": "C123",
"messageId": "1712023032.1234"
}
{
"action": "unpinMessage",
"channelId": "C123",
"messageId": "1712023032.1234"
}
{
"action": "listPins",
"channelId": "C123"
}
{
"action": "memberInfo",
"userId": "U123"
}
{
"action": "emojiList"
}