Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Commit b00d737

Browse files
authored
Merge pull request #161 from shuiping233/docs/kook-adapter
Docs: 更详细的kook适配器使用说明
2 parents de3eeb1 + c21ffbc commit b00d737

File tree

3 files changed

+91
-27
lines changed

3 files changed

+91
-27
lines changed

.vitepress/config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export default defineConfig({
105105
{ text: "Slack", link: "/slack" },
106106
{ text: "Misskey", link: "/misskey" },
107107
{ text: "Discord", link: "/discord" },
108+
{ text: "KOOK", link: "/kook" },
108109
{
109110
text: "Satori",
110111
base: "/platform/satori",
@@ -119,7 +120,6 @@ export default defineConfig({
119120
collapsed: false,
120121
items: [
121122
{ text: "Matrix", link: "/matrix" },
122-
{ text: "KOOK", link: "/kook" },
123123
{ text: "VoceChat", link: "/vocechat" },
124124
],
125125
},

en/platform/kook.md

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,46 @@
11
# Connect to KOOK
22

3-
1. Go to `Messaging Platforms``Add Adapter` → Select `KOOK`.
4-
2. Click the link to open the [KOOK Developer Platform](https://developer.kookapp.cn/app) and complete the following steps:
5-
1. Sign in and complete identity verification.
6-
2. Click **New Application** and set a bot nickname.
7-
3. In the app console, go to the **Bot** module and enable **WebSocket connection mode**.
8-
4. Copy the generated **Token**, paste it into the corresponding field in the AstrBot adapter, and click `Enable`.
9-
10-
![image](https://files.astrbot.app/docs/source/images/kook/image-1.png)
11-
12-
3. Click `Save` in the bottom-right corner to create the adapter.
13-
4. In AstrBot `Messaging Platforms` page, click **Invite Link**, set role permissions (full permissions recommended to ensure complete functionality).
14-
5. After setting permissions, copy the invite link and open it to add the bot to your target server.
15-
6. In a server channel, mention the bot and send `/sid`. If it replies successfully, the setup is complete.
3+
## Supported Message Types
4+
5+
> Version v4.19.2
6+
7+
| Message Type | Receive | Send | Remarks |
8+
| ------------ | ------- | ---- | -------------------------------------------------- |
9+
| Text | Yes | Yes | Supports official [kmarkdown] syntax |
10+
| Image | Yes | Yes | Supports external links; `jpeg`, `gif`, `png` only |
11+
| Audio | Yes | Yes | Supports external links |
12+
| Video | Yes | Yes | Supports external links; `mp4`, `mov` only |
13+
| File | Yes | Yes | Supports external links |
14+
| Card (JSON) | Yes | Yes | See [Kook Docs - Card Messages] |
15+
16+
Proactive message push: Supported
17+
Message receiving mode: WebSocket
18+
19+
## Create a Bot on Kook
20+
21+
1. Go to the [Kook Developer Center] and follow these steps:
22+
2. Log in and complete identity verification.
23+
3. Click "Create Application" and customize your Bot's nickname.
24+
4. Enter the application dashboard, select the **Bot** module, and enable **WebSocket connection mode**. Make sure to save the generated **Token**, as you will need it for the subsequent AstrBot configuration.
25+
5. Under the "Bot" page in the left sidebar, click "Invite Link" and set the role permissions (full permissions are recommended to ensure all features work).
26+
6. Copy the invite link, open it in your browser, and add the bot to your desired server.
27+
28+
![image](https://files.astrbot.app/docs/source/images/kook/image-1.png)
29+
30+
## Configure in AstrBot
31+
32+
1. Access the AstrBot management panel.
33+
2. Click **Bots** in the left sidebar.
34+
3. Click `+ Create Bot` on the right side of the interface.
35+
4. Select the `kook` adapter.
36+
5. Fill in the configuration fields:
37+
- ID (id): Any name to identify this specific instance.
38+
- Enable (enable): Check the box.
39+
- Bot Token: Paste the Token generated from the [Kook Developer Center].
40+
41+
6. Click `Save` after filling in the details.
42+
7. Finally, in a Kook server channel (create one first if you haven't), @ the bot and type `/sid`. If the bot responds, the configuration is successful.
43+
44+
[Kook Developer Center]: https://developer.kookapp.cn/app
45+
[kmarkdown]: https://developer.kookapp.cn/doc/kmarkdown
46+
[Kook Docs - Card Messages]: https://developer.kookapp.cn/doc/cardmessage

zh/platform/kook.md

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,48 @@
11
# 接入 Kook
22

3-
1. 前往 机器人 → 创建机器人 → 选择 Kook。
4-
2. 点击跳转 [Kook 开发者平台](https://developer.kookapp.cn/app) ,完成以下步骤:
5-
1. 登录账号并完成实名认证;
6-
2. 点击「新建应用」,自定义 Bot 昵称;
7-
3. 进入应用后台,选择「机器人」模块,开启 **WebSocket 连接模式**
8-
4. 复制生成的 **Token**,填入 AstrBot 适配器的对应字段,并点击 `启用`
9-
10-
![image](https://files.astrbot.app/docs/source/images/kook/image-1.png)
11-
12-
3. 点击右下角 `保存` 以新建适配器。
13-
4. 在左边栏「机器人」页面下点击「邀请链接」,设置角色权限(建议赋予全权限,确保功能完整)。
14-
5. 设置好角色权限后,点击上方邀请链接的复制按钮复制链接,打开这个链接,将机器人加入到所需的服务器。
15-
6. 在服务器频道中,@ 刚刚创建的机器人,输入 `/sid`,如果成功回复,则测试成功。
3+
## 支持的基本消息类型
4+
5+
> 版本 v4.19.2
6+
7+
| 消息类型 | 是否支持接收 | 是否支持发送 | 备注 |
8+
| ------------ | ------------ | ------------ | ---------------------------------------------- |
9+
| 文本 ||| 支持官方[kmarkdown]语法 |
10+
| 图片 ||| 支持外链,图片类型仅支持`jpeg``gif``png` |
11+
| 语音 ||| 支持外链 |
12+
| 视频 ||| 支持外链,视频仅支持`mp4``mov` |
13+
| 文件 ||| 支持外链 |
14+
| 卡片(JSON) ||| 参见[Kook文档-卡片消息] |
15+
16+
主动消息推送:支持
17+
18+
消息接收模式:WebSocket
19+
20+
## 在 Kook 创建机器人
21+
22+
1. 点击跳转 [Kook 开发者平台] ,完成以下步骤:
23+
2. 登录账号并完成实名认证;
24+
3. 点击「新建应用」,自定义 Bot 昵称;
25+
4. 进入应用后台,选择「机器人」模块,开启 **WebSocket 连接模式**,注意保存生成的 **Token**,后续配置Astrbot需要使用;
26+
5. 在左边栏「机器人」页面下点击「邀请链接」,设置角色权限(建议赋予全权限,确保功能完整)。
27+
6. 设置好角色权限后,点击上方邀请链接的复制按钮复制链接,在浏览器中打开复制出来的邀请链接,将机器人加入到所需的服务器。
28+
29+
![image](https://files.astrbot.app/docs/source/images/kook/image-1.png)
30+
31+
## 在 AstrBot 配置
32+
33+
1. 进入 AstrBot 的管理面板
34+
2. 点击左边栏 `机器人`
35+
3. 然后在右边的界面中,点击 `+ 创建机器人`
36+
4. 选择 `kook` 适配器
37+
5. 弹出的配置项填写:
38+
39+
- ID(id):随意填写,用于区分不同的消息平台实例。
40+
- 启用(enable): 勾选。
41+
- 机器人 Token: 填写在 [Kook 开发者平台] 中创建机器人时生成的 Token。
42+
43+
6. 完成适配器配置填写后,点击 `保存`
44+
7. 最后,在kook服务器频道(若没有属于自己的服务器频道,请先创建一个服务器频道)中,@ 刚刚创建的机器人,输入 `/sid`,如果机器人成功回复,则测试成功。
45+
46+
[Kook 开发者平台]: https://developer.kookapp.cn/app
47+
[kmarkdown]: https://developer.kookapp.cn/doc/kmarkdown
48+
[Kook文档-卡片消息]: https://developer.kookapp.cn/doc/cardmessage

0 commit comments

Comments
 (0)