Skip to content

Commit dfaaca1

Browse files
authored
docs: update Slack setup steps and screenshot (#10353)
* docs: update Slack setup steps and screenshot * docs: sync English Slack setup guide
1 parent 4c037c4 commit dfaaca1

3 files changed

Lines changed: 15 additions & 8 deletions

File tree

‎docs/en/platform/slack.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44

55
Navigate to the `Platforms` page, click `Add Adapter`, find Slack and click to enter the Slack configuration page.
66

7-
![image](https://files.astrbot.app/docs/source/images/slack/image-1.png)
8-
9-
In the configuration dialog that appears, click `Enable`.
7+
![Select the Slack messaging platform](/slack/image-1.png?v=2)
108

119
## Create an App in Slack
1210

1311
Slack supports two connection methods: `Webhook` and `Socket`. If you don't have a public server and your message volume is relatively small, we recommend using the `socket` method. If you have a public server (or have technical knowledge about setting up tunnels, such as Cloudflare Tunnel), you can choose the `webhook` method. The `socket` method is relatively simpler to deploy.
1412

1513
1. Create a [Slack](https://slack.com/signin) account and a Workspace.
16-
2. Go to [Apps Management](https://api.slack.com/apps), click "Create New App" -> "From Scratch", enter the `App Name` and the workspace to add it to, then click "Create App".
14+
2. Go to [Apps Management](https://api.slack.com/apps), click "Create New App" -> "Blank app" -> "Continue". Enter the `App Name`, select the workspace to add it to, then click "Create".
1715
3. (Webhook only) Obtain the `Signing Secret`. In the Basic Information page on the left sidebar, find `Signing Secret` under App Credentials, click Show and copy it to the signing_secret field in the platform adapter configuration.
1816

1917
![image](https://files.astrbot.app/docs/source/images/slack/image.png)
@@ -37,10 +35,13 @@ Slack supports two connection methods: `Webhook` and `Socket`. If you don't have
3735
- im:history
3836
- im:read
3937
- im:write
38+
- mpim:read
4039
- reactions:read
4140
- reactions:write
4241
- users:read
4342

43+
When subscribing to the `member_joined_channel` event, Slack automatically requires `mpim:read` to view basic information about group direct messages the bot has joined.
44+
4445
6. In the OAuth & Permissions page on the left sidebar, click `Install to xxx` under OAuth Token (where xxx is your workspace name). Then copy the generated Bot User OAuth Token to the bot_token field in the platform adapter configuration.
4546

4647
7. (Socket only) In the Socket Mode page on the left sidebar, enable Socket Mode.
@@ -85,6 +86,8 @@ After enabling, under Subscribe to bot events below, click Add Bot User Event an
8586
10. reaction_removed
8687
11. team_join
8788

89+
After adding the events, click `Save Changes` at the bottom of the page to save the subscriptions before testing below.
90+
8891
## Test the Connection
8992

9093
Enter the Slack workspace you just added, navigate to the channel where you want to use the bot, then @ mention the app you just created. Click the Add button in the message subsequently sent by Slackbot to add it to the workspace. Then, @ mention the app and type `/help`. If it responds successfully, the test is successful.

‎docs/public/slack/image-1.png‎

1.06 MB
Loading

‎docs/zh/platform/slack.md‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44

55
进入 `机器人` 页,点击 `+ 创建机器人`,找到 Slack 并点击进入 Slack 配置页。
66

7-
![image](https://files.astrbot.app/docs/source/images/slack/image-1.png)
8-
9-
在弹出的配置对话框中点击 `启用`。
7+
![选择 Slack 消息平台](/slack/image-1.png?v=2)
108

119
## 在 Slack 创建 App
1210

1311
Slack 支持两种接入方式:`Webhook` 与 `Socket`。如果您没有公网服务器并且消息业务量的规模较小,我们建议您使用 `socket` 方式。如果您有公网服务器(或者有一定的技术背景,了解如何设置 Tunnel,如 Cloudflare Tunnel),可以选择 `webhook` 方式。`socket` 方式部署相对简单。
1412

1513
1. 创建 [Slack](https://slack.com/signin) 账号和一个工作区(Workspace)。
16-
2. 前往 [应用后台](https://api.slack.com/apps),点击「Create New App」->「From Scratch」,输入 `应用名称` 和要添加到的工作区,然后点击「Create App」。
14+
2. 前往 [应用后台](https://api.slack.com/apps),点击「Create New App」->「Blank app」->「Continue」。输入 `应用名称` 和要添加到的工作区,然后点击「Create」。
15+
1716
3. (仅 Webhook 需要)获取 `Signing Secret`,在左边栏 Basic Information 页下,找到 App Credentials 的 `Signing Secret`,点击 Show 并且复制到平台适配器配置的 signing_secret 处。
1817

1918
![image](https://files.astrbot.app/docs/source/images/slack/image.png)
@@ -37,10 +36,13 @@ Slack 支持两种接入方式:`Webhook` 与 `Socket`。如果您没有公网
3736
- im:history
3837
- im:read
3938
- im:write
39+
- mpim:read
4040
- reactions:read
4141
- reactions:write
4242
- users:read
4343

44+
订阅 `member_joined_channel` 事件时,Slack 会自动要求 `mpim:read`,用于读取机器人已加入的群组私聊的基本信息。
45+
4446
6. 在左边栏 OAuth & Permissions 页下,在 Oauth Token 处点击 `Install to xxx`(xxx 是您工作区的名字)。然后复制生成的 Bot User OAuth Token 到平台适配器配置的 bot_token 处。
4547

4648
7. (仅 Socket 需要)在左边栏 Socket Mode 页下,开启 Enable Socket Mode。
@@ -84,6 +86,8 @@ Slack 支持两种接入方式:`Webhook` 与 `Socket`。如果您没有公网
8486
10. reaction_removed
8587
11. team_join
8688

89+
添加完成后,点击页面底部的 `Save Changes` 保存事件订阅,再进行下面的测试。
90+
8791
## 测试成功性
8892

8993
进入您刚刚添加的 Slack 工作区,进入需要用到 Bot 的频道,然后 @ 您刚刚创建的应用。然后点击 Slackbot 随后发送的消息中的 添加 按钮来添加到工作区中。然后,@ 应用,输入 `/help`,如果能够成功回复,说明测试成功。

0 commit comments

Comments
 (0)