{"id":35,"date":"2026-03-21T22:47:14","date_gmt":"2026-03-21T14:47:14","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/channels-slack\/"},"modified":"2026-03-21T23:29:14","modified_gmt":"2026-03-21T15:29:14","slug":"channels-slack","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/channels-slack\/","title":{"rendered":"Slack"},"content":{"rendered":"<h1>Slack<\/h1>\n<h2>Socket \u6a21\u5f0f\uff08\u9ed8\u8ba4\uff09<\/h2>\n<h3>\u5feb\u901f\u8bbe\u7f6e\uff08\u65b0\u624b\uff09<\/h3>\n<ol>\n<li>\u521b\u5efa\u4e00\u4e2a Slack \u5e94\u7528\u5e76\u542f\u7528 <strong>Socket Mode<\/strong>\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2a <strong>App Token<\/strong>\uff08<code>xapp-...<\/code>\uff09\u548c <strong>Bot Token<\/strong>\uff08<code>xoxb-...<\/code>\uff09\u3002<\/li>\n<li>\u4e3a OpenClaw \u8bbe\u7f6e\u4ee4\u724c\u5e76\u542f\u52a8 Gateway \u7f51\u5173 \u7f51\u5173\u3002<\/li>\n<\/ol>\n<p>\u6700\u5c0f\u914d\u7f6e\uff1a<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  \u6e20\u9053s: {<br \/>\n    slack: {<br \/>\n      enabled: true,<br \/>\n      appToken: &#8220;xapp-&#8230;&#8221;,<br \/>\n      botToken: &#8220;xoxb-&#8230;&#8221;,<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n### \u8bbe\u7f6e\n\n1. \u5728 [https:\/\/api.slack.com\/apps](https:\/\/api.slack.com\/apps) \u521b\u5efa\u4e00\u4e2a Slack \u5e94\u7528\uff08\u4ece\u5934\u5f00\u59cb\uff09\u3002\n2. **Socket Mode** \u2192 \u5f00\u542f\u3002\u7136\u540e\u524d\u5f80 **Basic Information** \u2192 **App-Level Tokens** \u2192 **Generate Token and Scopes**\uff0c\u6dfb\u52a0 `connections:write` \u6743\u9650\u8303\u56f4\u3002\u590d\u5236 **App Token**\uff08`xapp-...`\uff09\u3002\n3. **OAuth &amp; Permissions** \u2192 \u6dfb\u52a0 bot token \u6743\u9650\u8303\u56f4\uff08\u4f7f\u7528\u4e0b\u9762\u7684 manifest\uff09\u3002\u70b9\u51fb **Install to Workspace**\u3002\u590d\u5236 **Bot User OAuth Token**\uff08`xoxb-...`\uff09\u3002\n4. \u53ef\u9009\uff1a**OAuth &amp; Permissions** \u2192 \u6dfb\u52a0 **User Token Scopes**\uff08\u53c2\u89c1\u4e0b\u9762\u7684\u53ea\u8bfb\u5217\u8868\uff09\u3002\u91cd\u65b0\u5b89\u88c5\u5e94\u7528\u5e76\u590d\u5236 **User OAuth Token**\uff08`xoxp-...`\uff09\u3002\n5. **Event Subscriptions** \u2192 \u542f\u7528\u4e8b\u4ef6\u5e76\u8ba2\u9605\uff1a\n   * `message.*`\uff08\u5305\u62ec\u7f16\u8f91\/\u5220\u9664\/\u7ebf\u7a0b\u5e7f\u64ad\uff09\n   * `app_mention`\n   * `reaction_added`\u3001`reaction_removed`\n   * `member_joined_channel`\u3001`member_left_channel`\n   * `channel_rename`\n   * `pin_added`\u3001`pin_removed`\n6. \u9080\u8bf7\u673a\u5668\u4eba\u52a0\u5165\u4f60\u5e0c\u671b\u5b83\u8bfb\u53d6\u7684\u9891\u9053\u3002\n7. Slash Commands \u2192 \u5982\u679c\u4f60\u4f7f\u7528 `channels.slack.slashCommand`\uff0c\u521b\u5efa `\/openclaw`\u3002\u5982\u679c\u542f\u7528\u539f\u751f\u547d\u4ee4\uff0c\u4e3a\u6bcf\u4e2a\u5185\u7f6e\u547d\u4ee4\u6dfb\u52a0\u4e00\u4e2a\u659c\u6760\u547d\u4ee4\uff08\u540d\u79f0\u4e0e `\/help` \u76f8\u540c\uff09\u3002\u9664\u975e\u4f60\u8bbe\u7f6e `channels.slack.commands.native: true`\uff0c\u5426\u5219 Slack \u9ed8\u8ba4\u5173\u95ed\u539f\u751f\u547d\u4ee4\uff08\u5168\u5c40 `commands.native` \u662f `&quot;auto&quot;`\uff0c\u5bf9 Slack \u4fdd\u6301\u5173\u95ed\uff09\u3002\n8. App Home \u2192 \u542f\u7528 **Messages Tab** \u4ee5\u4fbf\u7528\u6237\u53ef\u4ee5\u79c1\u4fe1\u673a\u5668\u4eba\u3002\n\n\u4f7f\u7528\u4e0b\u9762\u7684 manifest \u4ee5\u4fdd\u6301\u6743\u9650\u8303\u56f4\u548c\u4e8b\u4ef6\u540c\u6b65\u3002\n\n\u591a\u8d26\u6237\u652f\u6301\uff1a\u4f7f\u7528 `channels.slack.accounts` \u914d\u7f6e\u6bcf\u4e2a\u8d26\u6237\u7684\u4ee4\u724c\u548c\u53ef\u9009\u7684 `name`\u3002\u53c2\u89c1 [`gateway\/configuration`](\/gateway\/configuration#telegramaccounts--discordaccounts--slackaccounts--signalaccounts--imessageaccounts) \u4e86\u89e3\u5171\u4eab\u6a21\u5f0f\u3002\n\n### OpenClaw \u914d\u7f6e\uff08\u6700\u5c0f\uff09\n\n\u901a\u8fc7\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4ee4\u724c\uff08\u63a8\u8350\uff09\uff1a\n\n* `SLACK_APP_TOKEN=xapp-...`\n* `SLACK_BOT_TOKEN=xoxb-...`\n\n\u6216\u901a\u8fc7\u914d\u7f6e\uff1a\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    slack: {\n      enabled: true,\n      appToken: &quot;xapp-...&quot;,\n      botToken: &quot;xoxb-...&quot;,\n    },\n  },\n}\n<\/code><\/pre>\n<h3>\u7528\u6237\u4ee4\u724c\uff08\u53ef\u9009\uff09<\/h3>\n<p>OpenClaw \u53ef\u4ee5\u4f7f\u7528 Slack \u7528\u6237\u4ee4\u724c\uff08<code>xoxp-...<\/code>\uff09\u8fdb\u884c\u8bfb\u53d6\u64cd\u4f5c\uff08\u5386\u53f2\u8bb0\u5f55\u3001\u7f6e\u9876\u3001\u8868\u60c5\u56de\u5e94\u3001\u8868\u60c5\u7b26\u53f7\u3001\u6210\u5458\u4fe1\u606f\uff09\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4fdd\u6301\u53ea\u8bfb\uff1a\u5f53\u5b58\u5728\u7528\u6237\u4ee4\u724c\u65f6\uff0c\u8bfb\u53d6\u4f18\u5148\u4f7f\u7528\u7528\u6237\u4ee4\u724c\uff0c\u800c\u5199\u5165\u4ecd\u7136\u4f7f\u7528 bot \u4ee4\u724c\uff0c\u9664\u975e\u4f60\u660e\u786e\u9009\u62e9\u52a0\u5165\u3002\u5373\u4f7f\u8bbe\u7f6e\u4e86 <code>userTokenReadOnly: false<\/code>\uff0c\u5f53 bot \u4ee4\u724c\u53ef\u7528\u65f6\uff0c\u5199\u5165\u4ecd\u7136\u4f18\u5148\u4f7f\u7528 bot \u4ee4\u724c\u3002<\/p>\n<p>\u7528\u6237\u4ee4\u724c\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\uff08\u4e0d\u652f\u6301\u73af\u5883\u53d8\u91cf\uff09\u3002\u5bf9\u4e8e\u591a\u8d26\u6237\uff0c\u8bbe\u7f6e <code>channels.slack.accounts.&lt;id&gt;.userToken<\/code>\u3002<\/p>\n<p>\u5305\u542b bot + app + \u7528\u6237\u4ee4\u724c\u7684\u793a\u4f8b\uff1a<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  \u6e20\u9053s: {<br \/>\n    slack: {<br \/>\n      enabled: true,<br \/>\n      appToken: &#8220;xapp-&#8230;&#8221;,<br \/>\n      botToken: &#8220;xoxb-&#8230;&#8221;,<br \/>\n      userToken: &#8220;xoxp-&#8230;&#8221;,<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n\u660e\u786e\u8bbe\u7f6e userTokenReadOnly \u7684\u793a\u4f8b\uff08\u5141\u8bb8\u7528\u6237\u4ee4\u724c\u5199\u5165\uff09\uff1a\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    slack: {\n      enabled: true,\n      appToken: &quot;xapp-...&quot;,\n      botToken: &quot;xoxb-...&quot;,\n      userToken: &quot;xoxp-...&quot;,\n      userTokenReadOnly: false,\n    },\n  },\n}\n<\/code><\/pre>\n<h4>\u4ee4\u724c\u4f7f\u7528<\/h4>\n<ul>\n<li>\u8bfb\u53d6\u64cd\u4f5c\uff08\u5386\u53f2\u8bb0\u5f55\u3001\u8868\u60c5\u56de\u5e94\u5217\u8868\u3001\u7f6e\u9876\u5217\u8868\u3001\u8868\u60c5\u7b26\u53f7\u5217\u8868\u3001\u6210\u5458\u4fe1\u606f\u3001\u641c\u7d22\uff09\u5728\u914d\u7f6e\u4e86\u7528\u6237\u4ee4\u724c\u65f6\u4f18\u5148\u4f7f\u7528\u7528\u6237\u4ee4\u724c\uff0c\u5426\u5219\u4f7f\u7528 bot \u4ee4\u724c\u3002<\/li>\n<li>\u5199\u5165\u64cd\u4f5c\uff08\u53d1\u9001\/\u7f16\u8f91\/\u5220\u9664\u6d88\u606f\u3001\u6dfb\u52a0\/\u79fb\u9664\u8868\u60c5\u56de\u5e94\u3001\u7f6e\u9876\/\u53d6\u6d88\u7f6e\u9876\u3001\u6587\u4ef6\u4e0a\u4f20\uff09\u9ed8\u8ba4\u4f7f\u7528 bot \u4ee4\u724c\u3002\u5982\u679c <code>userTokenReadOnly: false<\/code> \u4e14\u6ca1\u6709\u53ef\u7528\u7684 bot \u4ee4\u724c\uff0cOpenClaw \u4f1a\u56de\u9000\u5230\u7528\u6237\u4ee4\u724c\u3002<\/li>\n<\/ul>\n<h3>\u5386\u53f2\u4e0a\u4e0b\u6587<\/h3>\n<ul>\n<li><code>channels.slack.historyLimit<\/code>\uff08\u6216 <code>channels.slack.accounts.*.historyLimit<\/code>\uff09\u63a7\u5236\u5c06\u591a\u5c11\u6761\u6700\u8fd1\u7684\u9891\u9053\/\u7fa4\u7ec4\u6d88\u606f\u5305\u542b\u5230\u63d0\u793a\u4e2d\u3002<\/li>\n<li>\u56de\u9000\u5230 <code>messages.groupChat.historyLimit<\/code>\u3002\u8bbe\u7f6e\u4e3a <code>0<\/code> \u4ee5\u7981\u7528\uff08\u9ed8\u8ba4 50\uff09\u3002<\/li>\n<\/ul>\n<h2>HTTP \u6a21\u5f0f\uff08Events API\uff09<\/h2>\n<p>\u5f53\u4f60\u7684 Gateway \u7f51\u5173 \u7f51\u5173\u53ef\u4ee5\u901a\u8fc7 HTTPS \u88ab Slack \u8bbf\u95ee\u65f6\uff08\u670d\u52a1\u5668\u90e8\u7f72\u7684\u5178\u578b\u60c5\u51b5\uff09\uff0c\u4f7f\u7528 HTTP webhook \u6a21\u5f0f\u3002<br \/>\nHTTP \u6a21\u5f0f\u4f7f\u7528 Events API + Interactivity + Slash Commands\uff0c\u5171\u4eab\u4e00\u4e2a\u8bf7\u6c42 URL\u3002<\/p>\n<h3>\u8bbe\u7f6e<\/h3>\n<ol>\n<li>\u521b\u5efa\u4e00\u4e2a Slack \u5e94\u7528\u5e76<strong>\u7981\u7528 Socket Mode<\/strong>\uff08\u5982\u679c\u4f60\u53ea\u4f7f\u7528 HTTP \u5219\u53ef\u9009\uff09\u3002<\/li>\n<li><strong>Basic Information<\/strong> \u2192 \u590d\u5236 <strong>Signing Secret<\/strong>\u3002<\/li>\n<li><strong>OAuth &amp; Permissions<\/strong> \u2192 \u5b89\u88c5\u5e94\u7528\u5e76\u590d\u5236 <strong>Bot User OAuth Token<\/strong>\uff08<code>xoxb-...<\/code>\uff09\u3002<\/li>\n<li><strong>Event Subscriptions<\/strong> \u2192 \u542f\u7528\u4e8b\u4ef6\u5e76\u5c06 <strong>Request URL<\/strong> \u8bbe\u7f6e\u4e3a\u4f60\u7684 Gateway \u7f51\u5173 \u7f51\u5173 webhook \u8def\u5f84\uff08\u9ed8\u8ba4 <code>\/slack\/events<\/code>\uff09\u3002<\/li>\n<li><strong>Interactivity &amp; Shortcuts<\/strong> \u2192 \u542f\u7528\u5e76\u8bbe\u7f6e\u76f8\u540c\u7684 <strong>Request URL<\/strong>\u3002<\/li>\n<li><strong>Slash Commands<\/strong> \u2192 \u4e3a\u4f60\u7684\u547d\u4ee4\u8bbe\u7f6e\u76f8\u540c\u7684 <strong>Request URL<\/strong>\u3002<\/li>\n<\/ol>\n<p>\u793a\u4f8b\u8bf7\u6c42 URL\uff1a<br \/>\n<code>https:\/\/gateway-host\/slack\/events<\/code><\/p>\n<h3>OpenClaw \u914d\u7f6e\uff08\u6700\u5c0f\uff09<\/h3>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  \u6e20\u9053s: {<br \/>\n    slack: {<br \/>\n      enabled: true,<br \/>\n      mode: &#8220;http&#8221;,<br \/>\n      botToken: &#8220;xoxb-&#8230;&#8221;,<br \/>\n      signingSecret: &#8220;your-signing-secret&#8221;,<br \/>\n      webhookPath: &#8220;\/slack\/events&#8221;,<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n\u591a\u8d26\u6237 HTTP \u6a21\u5f0f\uff1a\u8bbe\u7f6e `channels.slack.accounts.&lt;id&gt;.mode = &quot;http&quot;` \u5e76\u4e3a\u6bcf\u4e2a\u8d26\u6237\u63d0\u4f9b\u552f\u4e00\u7684 `webhookPath`\uff0c\u4ee5\u4fbf\u6bcf\u4e2a Slack \u5e94\u7528\u53ef\u4ee5\u6307\u5411\u81ea\u5df1\u7684 URL\u3002\n\n### Manifest\uff08\u53ef\u9009\uff09\n\n\u4f7f\u7528\u6b64 Slack \u5e94\u7528 manifest \u5feb\u901f\u521b\u5efa\u5e94\u7528\uff08\u5982\u679c\u9700\u8981\u53ef\u4ee5\u8c03\u6574\u540d\u79f0\/\u547d\u4ee4\uff09\u3002\u5982\u679c\u4f60\u8ba1\u5212\u914d\u7f6e\u7528\u6237\u4ee4\u724c\uff0c\u8bf7\u5305\u542b\u7528\u6237\u6743\u9650\u8303\u56f4\u3002\n\n```json  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  &quot;display_information&quot;: {\n    &quot;name&quot;: &quot;OpenClaw&quot;,\n    &quot;description&quot;: &quot;Slack connector for OpenClaw&quot;\n  },\n  &quot;features&quot;: {\n    &quot;bot_user&quot;: {\n      &quot;display_name&quot;: &quot;OpenClaw&quot;,\n      &quot;always_online&quot;: false\n    },\n    &quot;app_home&quot;: {\n      &quot;messages_tab_enabled&quot;: true,\n      &quot;messages_tab_read_only_enabled&quot;: false\n    },\n    &quot;slash_commands&quot;: [\n      {\n        &quot;command&quot;: &quot;\/openclaw&quot;,\n        &quot;description&quot;: &quot;Send a message to OpenClaw&quot;,\n        &quot;should_escape&quot;: false\n      }\n    ]\n  },\n  &quot;oauth_config&quot;: {\n    &quot;scopes&quot;: {\n      &quot;bot&quot;: [\n        &quot;chat:write&quot;,\n        &quot;channels:history&quot;,\n        &quot;channels:read&quot;,\n        &quot;groups:history&quot;,\n        &quot;groups:read&quot;,\n        &quot;groups:write&quot;,\n        &quot;im:history&quot;,\n        &quot;im:read&quot;,\n        &quot;im:write&quot;,\n        &quot;mpim:history&quot;,\n        &quot;mpim:read&quot;,\n        &quot;mpim:write&quot;,\n        &quot;users:read&quot;,\n        &quot;app_mentions:read&quot;,\n        &quot;reactions:read&quot;,\n        &quot;reactions:write&quot;,\n        &quot;pins:read&quot;,\n        &quot;pins:write&quot;,\n        &quot;emoji:read&quot;,\n        &quot;commands&quot;,\n        &quot;files:read&quot;,\n        &quot;files:write&quot;\n      ],\n      &quot;user&quot;: [\n        &quot;channels:history&quot;,\n        &quot;channels:read&quot;,\n        &quot;groups:history&quot;,\n        &quot;groups:read&quot;,\n        &quot;im:history&quot;,\n        &quot;im:read&quot;,\n        &quot;mpim:history&quot;,\n        &quot;mpim:read&quot;,\n        &quot;users:read&quot;,\n        &quot;reactions:read&quot;,\n        &quot;pins:read&quot;,\n        &quot;emoji:read&quot;,\n        &quot;search:read&quot;\n      ]\n    }\n  },\n  &quot;settings&quot;: {\n    &quot;socket_mode_enabled&quot;: true,\n    &quot;event_subscriptions&quot;: {\n      &quot;bot_events&quot;: [\n        &quot;app_mention&quot;,\n        &quot;message.channels&quot;,\n        &quot;message.groups&quot;,\n        &quot;message.im&quot;,\n        &quot;message.mpim&quot;,\n        &quot;reaction_added&quot;,\n        &quot;reaction_removed&quot;,\n        &quot;member_joined_channel&quot;,\n        &quot;member_left_channel&quot;,\n        &quot;channel_rename&quot;,\n        &quot;pin_added&quot;,\n        &quot;pin_removed&quot;\n      ]\n    }\n  }\n}\n<\/code><\/pre>\n<p>\u5982\u679c\u542f\u7528\u539f\u751f\u547d\u4ee4\uff0c\u4e3a\u6bcf\u4e2a\u8981\u516c\u5f00\u7684\u547d\u4ee4\u6dfb\u52a0\u4e00\u4e2a <code>slash_commands<\/code> \u6761\u76ee\uff08\u4e0e <code>\/help<\/code> \u5217\u8868\u5339\u914d\uff09\u3002\u4f7f\u7528 <code>channels.slack.commands.native<\/code> \u8986\u76d6\u3002<\/p>\n<h2>\u6743\u9650\u8303\u56f4\uff08\u5f53\u524d vs \u53ef\u9009\uff09<\/h2>\n<p>Slack \u7684 Conversations API \u662f\u6309\u7c7b\u578b\u533a\u5206\u7684\uff1a\u4f60\u53ea\u9700\u8981\u4f60\u5b9e\u9645\u63a5\u89e6\u7684\u4f1a\u8bdd\u7c7b\u578b\uff08\u6e20\u9053s\u3001groups\u3001im\u3001mpim\uff09\u7684\u6743\u9650\u8303\u56f4\u3002\u6982\u8ff0\u53c2\u89c1 <a href=\"https:\/\/docs.slack.dev\/apis\/web-api\/using-the-conversations-api\/\u3002\">https:\/\/docs.slack.dev\/apis\/web-api\/using-the-conversations-api\/\u3002<\/a><\/p>\n<h3>Bot \u4ee4\u724c\u6743\u9650\u8303\u56f4\uff08\u5fc5\u9700\uff09<\/h3>\n<ul>\n<li><code>chat:write<\/code>\uff08\u901a\u8fc7 <code>chat.postMessage<\/code> \u53d1\u9001\/\u66f4\u65b0\/\u5220\u9664\u6d88\u606f\uff09<br \/>\n  <a href=\"https:\/\/docs.slack.dev\/reference\/methods\/chat.postMessage\">https:\/\/docs.slack.dev\/reference\/methods\/chat.postMessage<\/a><\/li>\n<li><code>im:write<\/code>\uff08\u901a\u8fc7 <code>conversations.open<\/code> \u6253\u5f00\u79c1\u4fe1\u7528\u4e8e\u7528\u6237\u79c1\u4fe1\uff09<br \/>\n  <a href=\"https:\/\/docs.slack.dev\/reference\/methods\/conversations.open\">https:\/\/docs.slack.dev\/reference\/methods\/conversations.open<\/a><\/li>\n<li><code>channels:history<\/code>\u3001<code>groups:history<\/code>\u3001<code>im:history<\/code>\u3001<code>mpim:history<\/code><br \/>\n  <a href=\"https:\/\/docs.slack.dev\/reference\/methods\/conversations.history\">https:\/\/docs.slack.dev\/reference\/methods\/conversations.history<\/a><\/li>\n<li><code>channels:read<\/code>\u3001<code>groups:read<\/code>\u3001<code>im:read<\/code>\u3001<code>mpim:read<\/code><br \/>\n  <a href=\"https:\/\/docs.slack.dev\/reference\/methods\/conversations.info\">https:\/\/docs.slack.dev\/reference\/methods\/conversations.info<\/a><\/li>\n<li><code>users:read<\/code>\uff08\u7528\u6237\u67e5\u8be2\uff09<br \/>\n  <a href=\"https:\/\/docs.slack.dev\/reference\/methods\/users.info\">https:\/\/docs.slack.dev\/reference\/methods\/users.info<\/a><\/li>\n<li><code>reactions:read<\/code>\u3001<code>reactions:write<\/code>\uff08<code>reactions.get<\/code> \/ <code>reactions.add<\/code>\uff09<br \/>\n  <a href=\"https:\/\/docs.slack.dev\/reference\/methods\/reactions.get\">https:\/\/docs.slack.dev\/reference\/methods\/reactions.get<\/a><br \/>\n  <a href=\"https:\/\/docs.slack.dev\/reference\/methods\/reactions.add\">https:\/\/docs.slack.dev\/reference\/methods\/reactions.add<\/a><\/li>\n<li><code>pins:read<\/code>\u3001<code>pins:write<\/code>\uff08<code>pins.list<\/code> \/ <code>pins.add<\/code> \/ <code>pins.remove<\/code>\uff09<br \/>\n  <a href=\"https:\/\/docs.slack.dev\/reference\/scopes\/pins.read\">https:\/\/docs.slack.dev\/reference\/scopes\/pins.read<\/a><br \/>\n  <a href=\"https:\/\/docs.slack.dev\/reference\/scopes\/pins.write\">https:\/\/docs.slack.dev\/reference\/scopes\/pins.write<\/a><\/li>\n<li><code>emoji:read<\/code>\uff08<code>emoji.list<\/code>\uff09<br \/>\n  <a href=\"https:\/\/docs.slack.dev\/reference\/scopes\/emoji.read\">https:\/\/docs.slack.dev\/reference\/scopes\/emoji.read<\/a><\/li>\n<li><code>files:write<\/code>\uff08\u901a\u8fc7 <code>files.uploadV2<\/code> \u4e0a\u4f20\uff09<br \/>\n  <a href=\"https:\/\/docs.slack.dev\/messaging\/working-with-files\/#upload\">https:\/\/docs.slack.dev\/messaging\/working-with-files\/#upload<\/a><\/li>\n<\/ul>\n<h3>\u7528\u6237\u4ee4\u724c\u6743\u9650\u8303\u56f4\uff08\u53ef\u9009\uff0c\u9ed8\u8ba4\u53ea\u8bfb\uff09<\/h3>\n<p>\u5982\u679c\u4f60\u914d\u7f6e\u4e86 <code>channels.slack.userToken<\/code>\uff0c\u5728 <strong>User Token Scopes<\/strong> \u4e0b\u6dfb\u52a0\u8fd9\u4e9b\u3002<\/p>\n<ul>\n<li><code>channels:history<\/code>\u3001<code>groups:history<\/code>\u3001<code>im:history<\/code>\u3001<code>mpim:history<\/code><\/li>\n<li><code>channels:read<\/code>\u3001<code>groups:read<\/code>\u3001<code>im:read<\/code>\u3001<code>mpim:read<\/code><\/li>\n<li><code>users:read<\/code><\/li>\n<li><code>reactions:read<\/code><\/li>\n<li><code>pins:read<\/code><\/li>\n<li><code>emoji:read<\/code><\/li>\n<li><code>search:read<\/code><\/li>\n<\/ul>\n<h3>\u76ee\u524d\u4e0d\u9700\u8981\uff08\u4f46\u672a\u6765\u53ef\u80fd\u9700\u8981\uff09<\/h3>\n<ul>\n<li><code>mpim:write<\/code>\uff08\u4ec5\u5f53\u6211\u4eec\u6dfb\u52a0\u7fa4\u7ec4\u79c1\u4fe1\u6253\u5f00\/\u79c1\u4fe1\u542f\u52a8\u65f6\u901a\u8fc7 <code>conversations.open<\/code>\uff09<\/li>\n<li><code>groups:write<\/code>\uff08\u4ec5\u5f53\u6211\u4eec\u6dfb\u52a0\u79c1\u6709\u9891\u9053\u7ba1\u7406\u65f6\uff1a\u521b\u5efa\/\u91cd\u547d\u540d\/\u9080\u8bf7\/\u5f52\u6863\uff09<\/li>\n<li><code>chat:write.public<\/code>\uff08\u4ec5\u5f53\u6211\u4eec\u60f3\u53d1\u5e03\u5230\u673a\u5668\u4eba\u672a\u52a0\u5165\u7684\u9891\u9053\u65f6\uff09<br \/>\n  <a href=\"https:\/\/docs.slack.dev\/reference\/scopes\/chat.write.public\">https:\/\/docs.slack.dev\/reference\/scopes\/chat.write.public<\/a><\/li>\n<li><code>users:read.email<\/code>\uff08\u4ec5\u5f53\u6211\u4eec\u9700\u8981\u4ece <code>users.info<\/code> \u83b7\u53d6\u90ae\u7bb1\u5b57\u6bb5\u65f6\uff09<br \/>\n  <a href=\"https:\/\/docs.slack.dev\/changelog\/2017-04-narrowing-email-access\">https:\/\/docs.slack.dev\/changelog\/2017-04-narrowing-email-access<\/a><\/li>\n<li><code>files:read<\/code>\uff08\u4ec5\u5f53\u6211\u4eec\u5f00\u59cb\u5217\u51fa\/\u8bfb\u53d6\u6587\u4ef6\u5143\u6570\u636e\u65f6\uff09<\/li>\n<\/ul>\n<h2>\u914d\u7f6e<\/h2>\n<p>Slack \u4ec5\u4f7f\u7528 Socket Mode\uff08\u65e0 HTTP webhook \u670d\u52a1\u5668\uff09\u3002\u63d0\u4f9b\u4e24\u4e2a\u4ee4\u724c\uff1a<\/p>\n<p>&#8220;`json  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  &#8220;slack&#8221;: {<br \/>\n    &#8220;enabled&#8221;: true,<br \/>\n    &#8220;botToken&#8221;: &#8220;xoxb-&#8230;&#8221;,<br \/>\n    &#8220;appToken&#8221;: &#8220;xapp-&#8230;&#8221;,<br \/>\n    &#8220;groupPolicy&#8221;: &#8220;allowlist&#8221;,<br \/>\n    &#8220;dm&#8221;: {<br \/>\n      &#8220;enabled&#8221;: true,<br \/>\n      &#8220;policy&#8221;: &#8220;pairing&#8221;,<br \/>\n      &#8220;allowFrom&#8221;: [&#8220;U123&#8221;, &#8220;U456&#8221;, &#8220;*&#8221;],<br \/>\n      &#8220;groupEnabled&#8221;: false,<br \/>\n      &#8220;groupChannels&#8221;: [&#8220;G123&#8221;],<br \/>\n      &#8220;replyToMode&#8221;: &#8220;all&#8221;<br \/>\n    },<br \/>\n    &#8220;\u6e20\u9053s&#8221;: {<br \/>\n      &#8220;C123&#8221;: { &#8220;allow&#8221;: true, &#8220;requireMention&#8221;: true },<br \/>\n      &#8220;#general&#8221;: {<br \/>\n        &#8220;allow&#8221;: true,<br \/>\n        &#8220;requireMention&#8221;: true,<br \/>\n        &#8220;users&#8221;: [&#8220;U123&#8221;],<br \/>\n        &#8220;skills&#8221;: [&#8220;search&#8221;, &#8220;docs&#8221;],<br \/>\n        &#8220;systemPrompt&#8221;: &#8220;Keep answers short.&#8221;<br \/>\n      }<br \/>\n    },<br \/>\n    &#8220;reactionNotifications&#8221;: &#8220;own&#8221;,<br \/>\n    &#8220;reactionAllowlist&#8221;: [&#8220;U123&#8221;],<br \/>\n    &#8220;replyToMode&#8221;: &#8220;off&#8221;,<br \/>\n    &#8220;actions&#8221;: {<br \/>\n      &#8220;reactions&#8221;: true,<br \/>\n      &#8220;messages&#8221;: true,<br \/>\n      &#8220;pins&#8221;: true,<br \/>\n      &#8220;memberInfo&#8221;: true,<br \/>\n      &#8220;emojiList&#8221;: true<br \/>\n    },<br \/>\n    &#8220;slashCommand&#8221;: {<br \/>\n      &#8220;enabled&#8221;: true,<br \/>\n      &#8220;name&#8221;: &#8220;openclaw&#8221;,<br \/>\n      &#8220;sessionPrefix&#8221;: &#8220;slack:slash&#8221;,<br \/>\n      &#8220;ephemeral&#8221;: true<br \/>\n    },<br \/>\n    &#8220;textChunkLimit&#8221;: 4000,<br \/>\n    &#8220;mediaMaxMb&#8221;: 20<br \/>\n  }<br \/>\n}<\/p>\n<pre><code>\n\u4ee4\u724c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u73af\u5883\u53d8\u91cf\u63d0\u4f9b\uff1a\n\n* `SLACK_BOT_TOKEN`\n* `SLACK_APP_TOKEN`\n\n\u786e\u8ba4\u8868\u60c5\u56de\u5e94\u901a\u8fc7 `messages.ackReaction` + `messages.ackReactionScope` \u5168\u5c40\u63a7\u5236\u3002\u4f7f\u7528 `messages.removeAckAfterReply` \u5728\u673a\u5668\u4eba\u56de\u590d\u540e\u6e05\u9664\u786e\u8ba4\u8868\u60c5\u56de\u5e94\u3002\n\n## \u9650\u5236\n\n* \u51fa\u7ad9\u6587\u672c\u6309 `channels.slack.textChunkLimit` \u5206\u5757\uff08\u9ed8\u8ba4 4000\uff09\u3002\n* \u53ef\u9009\u7684\u6362\u884c\u5206\u5757\uff1a\u8bbe\u7f6e `channels.slack.chunkMode=&quot;newline&quot;` \u4ee5\u5728\u957f\u5ea6\u5206\u5757\u4e4b\u524d\u6309\u7a7a\u884c\uff08\u6bb5\u843d\u8fb9\u754c\uff09\u5206\u5272\u3002\n* \u5a92\u4f53\u4e0a\u4f20\u53d7 `channels.slack.mediaMaxMb` \u9650\u5236\uff08\u9ed8\u8ba4 20\uff09\u3002\n\n## \u56de\u590d\u7ebf\u7a0b\n\n\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cOpenClaw \u5728\u4e3b\u9891\u9053\u56de\u590d\u3002\u4f7f\u7528 `channels.slack.replyToMode` \u63a7\u5236\u81ea\u52a8\u7ebf\u7a0b\uff1a\n\n| \u6a21\u5f0f      | \u884c\u4e3a                                             |\n| ------- | ---------------------------------------------- |\n| `off`   | **\u9ed8\u8ba4\u3002** \u5728\u4e3b\u9891\u9053\u56de\u590d\u3002\u4ec5\u5f53\u89e6\u53d1\u6d88\u606f\u5df2\u5728\u7ebf\u7a0b\u4e2d\u65f6\u624d\u4f7f\u7528\u7ebf\u7a0b\u3002              |\n| `first` | \u7b2c\u4e00\u6761\u56de\u590d\u8fdb\u5165\u7ebf\u7a0b\uff08\u5728\u89e6\u53d1\u6d88\u606f\u4e0b\uff09\uff0c\u540e\u7eed\u56de\u590d\u8fdb\u5165\u4e3b\u9891\u9053\u3002\u9002\u5408\u4fdd\u6301\u4e0a\u4e0b\u6587\u53ef\u89c1\u540c\u65f6\u907f\u514d\u7ebf\u7a0b\u6df7\u4e71\u3002 |\n| `all`   | \u6240\u6709\u56de\u590d\u90fd\u8fdb\u5165\u7ebf\u7a0b\u3002\u4fdd\u6301\u5bf9\u8bdd\u96c6\u4e2d\u4f46\u53ef\u80fd\u964d\u4f4e\u53ef\u89c1\u6027\u3002                      |\n\n\u8be5\u6a21\u5f0f\u9002\u7528\u4e8e\u81ea\u52a8\u56de\u590d\u548c\u667a\u80fd\u4f53\u5de5\u5177\u8c03\u7528\uff08`slack sendMessage`\uff09\u3002\n\n### \u6309\u804a\u5929\u7c7b\u578b\u7684\u7ebf\u7a0b\n\n\u4f60\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e `channels.slack.replyToModeByChatType` \u4e3a\u6bcf\u79cd\u804a\u5929\u7c7b\u578b\u914d\u7f6e\u4e0d\u540c\u7684\u7ebf\u7a0b\u884c\u4e3a\uff1a\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    slack: {\n      replyToMode: &quot;off&quot;, \/\/ \u9891\u9053\u7684\u9ed8\u8ba4\u503c\n      replyToModeByChatType: {\n        direct: &quot;all&quot;, \/\/ \u79c1\u4fe1\u59cb\u7ec8\u4f7f\u7528\u7ebf\u7a0b\n        group: &quot;first&quot;, \/\/ \u7fa4\u7ec4\u79c1\u4fe1\/MPIM \u7b2c\u4e00\u6761\u56de\u590d\u4f7f\u7528\u7ebf\u7a0b\n      },\n    },\n  },\n}\n<\/code><\/pre>\n<p>\u652f\u6301\u7684\u804a\u5929\u7c7b\u578b\uff1a<\/p>\n<ul>\n<li><code>direct<\/code>\uff1a\u4e00\u5bf9\u4e00\u79c1\u4fe1\uff08Slack <code>im<\/code>\uff09<\/li>\n<li><code>group<\/code>\uff1a\u7fa4\u7ec4\u79c1\u4fe1 \/ MPIM\uff08Slack <code>mpim<\/code>\uff09<\/li>\n<li><code>channel<\/code>\uff1a\u6807\u51c6\u9891\u9053\uff08\u516c\u5f00\/\u79c1\u6709\uff09<\/li>\n<\/ul>\n<p>\u4f18\u5148\u7ea7\uff1a<\/p>\n<ol>\n<li><code>replyToModeByChatType.&lt;chatType&gt;<\/code><\/li>\n<li><code>replyToMode<\/code><\/li>\n<li>\u63d0\u4f9b\u5546\u9ed8\u8ba4\u503c\uff08<code>off<\/code>\uff09<\/li>\n<\/ol>\n<p>\u5f53\u672a\u8bbe\u7f6e\u804a\u5929\u7c7b\u578b\u8986\u76d6\u65f6\uff0c\u65e7\u7248 <code>channels.slack.dm.replyToMode<\/code> \u4ecd\u53ef\u4f5c\u4e3a <code>direct<\/code> \u7684\u56de\u9000\u3002<\/p>\n<p>\u793a\u4f8b\uff1a<\/p>\n<p>\u4ec5\u5bf9\u79c1\u4fe1\u4f7f\u7528\u7ebf\u7a0b\uff1a<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  \u6e20\u9053s: {<br \/>\n    slack: {<br \/>\n      replyToMode: &#8220;off&#8221;,<br \/>\n      replyToModeByChatType: { direct: &#8220;all&#8221; },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n\u5bf9\u7fa4\u7ec4\u79c1\u4fe1\u4f7f\u7528\u7ebf\u7a0b\u4f46\u4fdd\u6301\u9891\u9053\u5728\u6839\u7ea7\u522b\uff1a\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  channels: {\n    slack: {\n      replyToMode: &quot;off&quot;,\n      replyToModeByChatType: { group: &quot;first&quot; },\n    },\n  },\n}\n<\/code><\/pre>\n<p>\u8ba9\u9891\u9053\u4f7f\u7528\u7ebf\u7a0b\uff0c\u4fdd\u6301\u79c1\u4fe1\u5728\u6839\u7ea7\u522b\uff1a<\/p>\n<p><code>json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n{<br \/>\n  channels: {<br \/>\n    slack: {<br \/>\n      replyToMode: \"first\",<br \/>\n      replyToModeByChatType: { direct: \"off\", group: \"off\" },<br \/>\n    },<br \/>\n  },<br \/>\n}<\/code><\/p>\n<h3>\u624b\u52a8\u7ebf\u7a0b\u6807\u7b7e<\/h3>\n<p>\u5bf9\u4e8e\u7ec6\u7c92\u5ea6\u63a7\u5236\uff0c\u5728\u667a\u80fd\u4f53\u54cd\u5e94\u4e2d\u4f7f\u7528\u8fd9\u4e9b\u6807\u7b7e\uff1a<\/p>\n<ul>\n<li><code>[[reply_to_current]]<\/code> \u2014 \u56de\u590d\u89e6\u53d1\u6d88\u606f\uff08\u5f00\u59cb\/\u7ee7\u7eed\u7ebf\u7a0b\uff09\u3002<\/li>\n<li><code>[[reply_to:&lt;id&gt;]]<\/code> \u2014 \u56de\u590d\u7279\u5b9a\u7684\u6d88\u606f id\u3002<\/li>\n<\/ul>\n<h2>\u4f1a\u8bdd + \u8def\u7531<\/h2>\n<ul>\n<li>\u79c1\u4fe1\u5171\u4eab <code>main<\/code> \u4f1a\u8bdd\uff08\u4e0e WhatsApp\/Telegram \u76f8\u540c\uff09\u3002<\/li>\n<li>\u9891\u9053\u6620\u5c04\u5230 <code>agent:&lt;agentId&gt;:slack:channel:&lt;channelId&gt;<\/code> \u4f1a\u8bdd\u3002<\/li>\n<li>\u659c\u6760\u547d\u4ee4\u4f7f\u7528 <code>agent:&lt;agentId&gt;:slack:slash:&lt;userId&gt;<\/code> \u4f1a\u8bdd\uff08\u524d\u7f00\u53ef\u901a\u8fc7 <code>channels.slack.slashCommand.sessionPrefix<\/code> \u914d\u7f6e\uff09\u3002<\/li>\n<li>\u5982\u679c Slack \u672a\u63d0\u4f9b <code>channel_type<\/code>\uff0cOpenClaw \u4f1a\u4ece\u9891\u9053 ID \u524d\u7f00\uff08<code>D<\/code>\u3001<code>C<\/code>\u3001<code>G<\/code>\uff09\u63a8\u65ad\u5e76\u9ed8\u8ba4\u4e3a <code>channel<\/code> \u4ee5\u4fdd\u6301\u4f1a\u8bdd\u952e\u7a33\u5b9a\u3002<\/li>\n<li>\u539f\u751f\u547d\u4ee4\u6ce8\u518c\u4f7f\u7528 <code>commands.native<\/code>\uff08\u5168\u5c40\u9ed8\u8ba4 <code>\"auto\"<\/code> \u2192 Slack \u5173\u95ed\uff09\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>channels.slack.commands.native<\/code> \u6309\u5de5\u4f5c\u7a7a\u95f4\u8986\u76d6\u3002\u6587\u672c\u547d\u4ee4\u9700\u8981\u72ec\u7acb\u7684 <code>\/...<\/code> \u6d88\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>commands.text: false<\/code> \u7981\u7528\u3002Slack \u659c\u6760\u547d\u4ee4\u5728 Slack \u5e94\u7528\u4e2d\u7ba1\u7406\uff0c\u4e0d\u4f1a\u81ea\u52a8\u79fb\u9664\u3002\u4f7f\u7528 <code>commands.useAccessGroups: false<\/code> \u7ed5\u8fc7\u547d\u4ee4\u7684\u8bbf\u95ee\u7ec4\u68c0\u67e5\u3002<\/li>\n<li>\u5b8c\u6574\u547d\u4ee4\u5217\u8868 + \u914d\u7f6e\uff1a<a href=\"https:\/\/pa.yingzhi8.cn\/?p=293\">\u659c\u6760\u547d\u4ee4<\/a><\/li>\n<\/ul>\n<h2>\u79c1\u4fe1\u5b89\u5168\uff08\u914d\u5bf9\uff09<\/h2>\n<ul>\n<li>\u9ed8\u8ba4\uff1a<code>channels.slack.dm.policy=\"pairing\"<\/code> \u2014 \u672a\u77e5\u7684\u79c1\u4fe1\u53d1\u9001\u8005\u4f1a\u6536\u5230\u914d\u5bf9\u7801\uff081 \u5c0f\u65f6\u540e\u8fc7\u671f\uff09\u3002<\/li>\n<li>\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u6279\u51c6\uff1a<code>openclaw pairing approve slack &lt;code&gt;<\/code>\u3002<\/li>\n<li>\u8981\u5141\u8bb8\u4efb\u4f55\u4eba\uff1a\u8bbe\u7f6e <code>channels.slack.dm.policy=\"open\"<\/code> \u548c <code>channels.slack.dm.allowFrom=[\"*\"]<\/code>\u3002<\/li>\n<li><code>channels.slack.dm.allowFrom<\/code> \u63a5\u53d7\u7528\u6237 ID\u3001@\u7528\u6237\u540d\u6216\u90ae\u7bb1\uff08\u5728\u4ee4\u724c\u5141\u8bb8\u65f6\u542f\u52a8\u65f6\u89e3\u6790\uff09\u3002\u5411\u5bfc\u5728\u8bbe\u7f6e\u671f\u95f4\u63a5\u53d7\u7528\u6237\u540d\uff0c\u5e76\u5728\u4ee4\u724c\u5141\u8bb8\u65f6\u5c06\u5176\u89e3\u6790\u4e3a ID\u3002<\/li>\n<\/ul>\n<h2>\u7fa4\u7ec4\u7b56\u7565<\/h2>\n<ul>\n<li><code>channels.slack.groupPolicy<\/code> \u63a7\u5236\u9891\u9053\u5904\u7406\uff08<code>open|disabled|allowlist<\/code>\uff09\u3002<\/li>\n<li><code>allowlist<\/code> \u8981\u6c42\u9891\u9053\u5217\u5728 <code>channels.slack.channels<\/code> \u4e2d\u3002<\/li>\n<li>\u5982\u679c\u4f60\u53ea\u8bbe\u7f6e\u4e86 <code>SLACK_BOT_TOKEN<\/code>\/<code>SLACK_APP_TOKEN<\/code> \u800c\u4ece\u672a\u521b\u5efa <code>channels.slack<\/code> \u90e8\u5206\uff0c\u8fd0\u884c\u65f6\u9ed8\u8ba4\u5c06 <code>groupPolicy<\/code> \u8bbe\u4e3a <code>open<\/code>\u3002\u6dfb\u52a0 <code>channels.slack.groupPolicy<\/code>\u3001<code>channels.defaults.groupPolicy<\/code> \u6216\u9891\u9053\u767d\u540d\u5355\u6765\u9501\u5b9a\u5b83\u3002<\/li>\n<li>\u914d\u7f6e\u5411\u5bfc\u63a5\u53d7 <code>#channel<\/code> \u540d\u79f0\uff0c\u5e76\u5728\u53ef\u80fd\u65f6\uff08\u516c\u5f00 + \u79c1\u6709\uff09\u5c06\u5176\u89e3\u6790\u4e3a ID\uff1b\u5982\u679c\u5b58\u5728\u591a\u4e2a\u5339\u914d\uff0c\u5b83\u4f18\u5148\u9009\u62e9\u6d3b\u8dc3\u7684\u9891\u9053\u3002<\/li>\n<li>\u542f\u52a8\u65f6\uff0cOpenClaw \u5c06\u767d\u540d\u5355\u4e2d\u7684\u9891\u9053\/\u7528\u6237\u540d\u89e3\u6790\u4e3a ID\uff08\u5728\u4ee4\u724c\u5141\u8bb8\u65f6\uff09\u5e76\u8bb0\u5f55\u6620\u5c04\uff1b\u672a\u89e3\u6790\u7684\u6761\u76ee\u6309\u539f\u6837\u4fdd\u7559\u3002<\/li>\n<li>\u8981<strong>\u4e0d\u5141\u8bb8\u4efb\u4f55\u9891\u9053<\/strong>\uff0c\u8bbe\u7f6e <code>channels.slack.groupPolicy: \"disabled\"<\/code>\uff08\u6216\u4fdd\u7559\u7a7a\u767d\u540d\u5355\uff09\u3002<\/li>\n<\/ul>\n<p>\u9891\u9053\u9009\u9879\uff08<code>channels.slack.channels.&lt;id&gt;<\/code> \u6216 <code>channels.slack.channels.&lt;name&gt;<\/code>\uff09\uff1a<\/p>\n<ul>\n<li><code>allow<\/code>\uff1a\u5f53 <code>groupPolicy=\"allowlist\"<\/code> \u65f6\u5141\u8bb8\/\u62d2\u7edd\u9891\u9053\u3002<\/li>\n<li><code>requireMention<\/code>\uff1a\u9891\u9053\u7684\u63d0\u53ca\u95e8\u63a7\u3002<\/li>\n<li><code>tools<\/code>\uff1a\u53ef\u9009\u7684\u6bcf\u9891\u9053\u5de5\u5177\u7b56\u7565\u8986\u76d6\uff08<code>allow<\/code>\/<code>deny<\/code>\/<code>alsoAllow<\/code>\uff09\u3002<\/li>\n<li><code>toolsBySender<\/code>\uff1a\u9891\u9053\u5185\u53ef\u9009\u7684\u6bcf\u53d1\u9001\u8005\u5de5\u5177\u7b56\u7565\u8986\u76d6\uff08\u952e\u4e3a\u53d1\u9001\u8005 id\/@\u7528\u6237\u540d\/\u90ae\u7bb1\uff1b\u652f\u6301 <code>\"*\"<\/code> \u901a\u914d\u7b26\uff09\u3002<\/li>\n<li><code>allowBots<\/code>\uff1a\u5141\u8bb8\u6b64\u9891\u9053\u4e2d\u673a\u5668\u4eba\u53d1\u9001\u7684\u6d88\u606f\uff08\u9ed8\u8ba4\uff1afalse\uff09\u3002<\/li>\n<li><code>users<\/code>\uff1a\u53ef\u9009\u7684\u6bcf\u9891\u9053\u7528\u6237\u767d\u540d\u5355\u3002<\/li>\n<li><code>skills<\/code>\uff1aSkills \u8fc7\u6ee4\u5668\uff08\u7701\u7565 = \u6240\u6709 Skills\uff0c\u7a7a = \u65e0\uff09\u3002<\/li>\n<li><code>systemPrompt<\/code>\uff1a\u9891\u9053\u7684\u989d\u5916\u7cfb\u7edf\u63d0\u793a\uff08\u4e0e\u4e3b\u9898\/\u76ee\u7684\u7ec4\u5408\uff09\u3002<\/li>\n<li><code>enabled<\/code>\uff1a\u8bbe\u7f6e\u4e3a <code>false<\/code> \u4ee5\u7981\u7528\u9891\u9053\u3002<\/li>\n<\/ul>\n<h2>\u6295\u9012\u76ee\u6807<\/h2>\n<p>\u4e0e cron\/CLI \u53d1\u9001\u4e00\u8d77\u4f7f\u7528\uff1a<\/p>\n<ul>\n<li><code>user:&lt;id&gt;<\/code> \u7528\u4e8e\u79c1\u4fe1<\/li>\n<li><code>channel:&lt;id&gt;<\/code> \u7528\u4e8e\u9891\u9053<\/li>\n<\/ul>\n<h2>\u5de5\u5177\u64cd\u4f5c<\/h2>\n<p>Slack \u5de5\u5177\u64cd\u4f5c\u53ef\u4ee5\u901a\u8fc7 <code>channels.slack.actions.*<\/code> \u8fdb\u884c\u95e8\u63a7\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u64cd\u4f5c\u7ec4<\/th>\n<th>\u9ed8\u8ba4<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>reactions<\/td>\n<td>\u5df2\u542f\u7528<\/td>\n<td>\u8868\u60c5\u56de\u5e94 + \u5217\u51fa\u8868\u60c5\u56de\u5e94<\/td>\n<\/tr>\n<tr>\n<td>messages<\/td>\n<td>\u5df2\u542f\u7528<\/td>\n<td>\u8bfb\u53d6\/\u53d1\u9001\/\u7f16\u8f91\/\u5220\u9664<\/td>\n<\/tr>\n<tr>\n<td>pins<\/td>\n<td>\u5df2\u542f\u7528<\/td>\n<td>\u7f6e\u9876\/\u53d6\u6d88\u7f6e\u9876\/\u5217\u8868<\/td>\n<\/tr>\n<tr>\n<td>memberInfo<\/td>\n<td>\u5df2\u542f\u7528<\/td>\n<td>\u6210\u5458\u4fe1\u606f<\/td>\n<\/tr>\n<tr>\n<td>emojiList<\/td>\n<td>\u5df2\u542f\u7528<\/td>\n<td>\u81ea\u5b9a\u4e49\u8868\u60c5\u7b26\u53f7\u5217\u8868<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u5b89\u5168\u8bf4\u660e<\/h2>\n<ul>\n<li>\u5199\u5165\u9ed8\u8ba4\u4f7f\u7528 bot \u4ee4\u724c\uff0c\u56e0\u6b64\u72b6\u6001\u66f4\u6539\u64cd\u4f5c\u4fdd\u6301\u5728\u5e94\u7528\u7684\u673a\u5668\u4eba\u6743\u9650\u548c\u8eab\u4efd\u8303\u56f4\u5185\u3002<\/li>\n<li>\u8bbe\u7f6e <code>userTokenReadOnly: false<\/code> \u5141\u8bb8\u5728 bot \u4ee4\u724c\u4e0d\u53ef\u7528\u65f6\u4f7f\u7528\u7528\u6237\u4ee4\u724c\u8fdb\u884c\u5199\u5165\u64cd\u4f5c\uff0c\u8fd9\u610f\u5473\u7740\u64cd\u4f5c\u4ee5\u5b89\u88c5\u7528\u6237\u7684\u8bbf\u95ee\u6743\u9650\u8fd0\u884c\u3002\u5c06\u7528\u6237\u4ee4\u724c\u89c6\u4e3a\u9ad8\u6743\u9650\uff0c\u5e76\u4fdd\u6301\u64cd\u4f5c\u95e8\u63a7\u548c\u767d\u540d\u5355\u4e25\u683c\u3002<\/li>\n<li>\u5982\u679c\u4f60\u542f\u7528\u7528\u6237\u4ee4\u724c\u5199\u5165\uff0c\u8bf7\u8bf7\u786e\u4fdd\u7528\u6237\u4ee4\u724c\u5305\u542b\u4f60\u671f\u671b\u7684\u5199\u5165\u6743\u9650\u8303\u56f4\uff08<code>chat:write<\/code>\u3001<code>reactions:write<\/code>\u3001<code>pins:write<\/code>\u3001<code>files:write<\/code>\uff09\uff0c\u5426\u5219\u8fd9\u4e9b\u64cd\u4f5c\u5c06\u5931\u8d25\u3002<\/li>\n<\/ul>\n<h2>\u8bf4\u660e<\/h2>\n<ul>\n<li>\u63d0\u53ca\u95e8\u63a7\u901a\u8fc7 <code>channels.slack.channels<\/code> \u63a7\u5236\uff08\u5c06 <code>requireMention<\/code> \u8bbe\u7f6e\u4e3a <code>true<\/code>\uff09\uff1b<code>agents.list[].groupChat.mentionPatterns<\/code>\uff08\u6216 <code>messages.groupChat.mentionPatterns<\/code>\uff09\u4e5f\u7b97\u4f5c\u63d0\u53ca\u3002<\/li>\n<li>\u591a\u667a\u80fd\u4f53\u8986\u76d6\uff1a\u5728 <code>agents.list[].groupChat.mentionPatterns<\/code> \u4e0a\u8bbe\u7f6e\u6bcf\u667a\u80fd\u4f53\u7684\u6a21\u5f0f\u3002<\/li>\n<li>\u8868\u60c5\u56de\u5e94\u901a\u77e5\u9075\u5faa <code>channels.slack.reactionNotifications<\/code>\uff08\u5728 <code>allowlist<\/code> \u6a21\u5f0f\u4e0b\u4f7f\u7528 <code>reactionAllowlist<\/code>\uff09\u3002<\/li>\n<li>\u9ed8\u8ba4\u5ffd\u7565\u673a\u5668\u4eba\u53d1\u9001\u7684\u6d88\u606f\uff1b\u901a\u8fc7 <code>channels.slack.allowBots<\/code> \u6216 <code>channels.slack.channels.&lt;id&gt;.allowBots<\/code> \u542f\u7528\u3002<\/li>\n<li>\u8b66\u544a\uff1a\u5982\u679c\u4f60\u5141\u8bb8\u56de\u590d\u5176\u4ed6\u673a\u5668\u4eba\uff08<code>channels.slack.allowBots=true<\/code> \u6216 <code>channels.slack.channels.&lt;id&gt;.allowBots=true<\/code>\uff09\uff0c\u8bf7\u4f7f\u7528 <code>requireMention<\/code>\u3001<code>channels.slack.channels.&lt;id&gt;.users<\/code> \u767d\u540d\u5355\u548c\/\u6216\u5728 <code>AGENTS.md<\/code> \u548c <code>SOUL.md<\/code> \u4e2d\u8bbe\u7f6e\u660e\u786e\u7684\u9632\u62a4\u63aa\u65bd\u6765\u9632\u6b62\u673a\u5668\u4eba\u4e4b\u95f4\u7684\u56de\u590d\u5faa\u73af\u3002<\/li>\n<li>\u5bf9\u4e8e Slack \u5de5\u5177\uff0c\u8868\u60c5\u56de\u5e94\u79fb\u9664\u8bed\u4e49\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=290\">\/tools\/reactions<\/a>\u3002<\/li>\n<li>\u9644\u4ef6\u5728\u5141\u8bb8\u4e14\u5728\u5927\u5c0f\u9650\u5236\u5185\u65f6\u4f1a\u4e0b\u8f7d\u5230\u5a92\u4f53\u5b58\u50a8\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Slack Socket \u6a21\u5f0f\uff08\u9ed8\u8ba4\uff09 \u5feb\u901f\u8bbe\u7f6e\uff08\u65b0\u624b\uff09 \u521b\u5efa\u4e00\u4e2a Slack \u5e94\u7528\u5e76\u542f\u7528 Socket Mo [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-35","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/35","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=35"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":853,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/35\/revisions\/853"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}