Skip to content

Commit 780d8dc

Browse files
committed
fix
1 parent 8da35c6 commit 780d8dc

File tree

3 files changed

+84
-93
lines changed

3 files changed

+84
-93
lines changed

.vitepress/config.mjs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ export default defineConfig({
7676
],
7777
},
7878
{
79-
text: "QQ 个人号",
79+
text: "OneBot v11",
8080
base: "/deploy/platform/aiocqhttp",
8181
collapsed: true,
8282
items: [
83-
{ text: "使用 NapCat", link: "/napcat" },
84-
{ text: "使用 Lagrange", link: "/lagrange" },
85-
{ text: "使用其他端", link: "/others" },
83+
{ text: "NapCat", link: "/napcat" },
84+
{ text: "Lagrange", link: "/lagrange" },
85+
{ text: "其他端", link: "/others" },
8686
],
8787
},
8888
{ text: "企微应用", link: "/wecom" },
@@ -293,13 +293,13 @@ export default defineConfig({
293293
],
294294
},
295295
{
296-
text: "QQ Personal Account",
296+
text: "OneBot v11",
297297
base: "/en/deploy/platform/aiocqhttp",
298298
collapsed: true,
299299
items: [
300-
{ text: "Using NapCat", link: "/napcat" },
301-
{ text: "Using Lagrange", link: "/lagrange" },
302-
{ text: "Using Other Clients", link: "/others" },
300+
{ text: "NapCat", link: "/napcat" },
301+
{ text: "Lagrange", link: "/lagrange" },
302+
{ text: "Other Clients", link: "/others" },
303303
],
304304
},
305305
{ text: "WeCom Application", link: "/wecom" },
Lines changed: 66 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,57 @@
1-
# 通过 NapCatQQ 协议实现端接入 QQ
1+
# Using NapCat
22

33
> [!TIP]
44
>
5-
> - 请合理控制使用频率。过于频繁地发送消息可能会被判定为异常行为,增加触发风控机制的风险。
6-
> - 本项目严禁用于任何违反法律法规的用途。若您意图将 AstrBot 应用于非法产业或活动,我们**明确反对并拒绝**您使用本项目。
5+
> - Please control usage frequency appropriately. Sending messages too frequently may be identified as abnormal behavior, increasing the risk of triggering risk control mechanisms.
6+
> - This project is strictly prohibited from being used for any purpose that violates laws and regulations. If you intend to use AstrBot for illegal industries or activities, we **explicitly oppose and refuse** your use of this project.
7+
> - AstrBot connects to the OneBot v11 protocol through the `aiocqhttp` adapter. OneBot v11 protocol is an open communication protocol and does not represent any specific software or service.
78
8-
NapCatQQ 是基于无头 QQNT 的 OneBot 协议实现端。它本质上运行了一个 QQNT 实例。
9+
NapCat's GitHub Repository: [NapCat](https://github.com/NapNeko/NapCatQQ)
10+
NapCat's Documentation: [NapCat Documentation](https://napcat.napneko.icu/)
911

10-
NapCatQQ 的 GitHub 仓库:[NapCatQQ](https://github.com/NapNeko/NapCatQQ)
11-
NapCatQQ 的文档:[NapCatQQ 文档](https://napcat.napneko.icu/)
12+
NapCat provides multiple deployment methods, including Docker, Windows one-click installation packages, and more.
1213

13-
> [!WARNING]
14-
> 前置准备:
15-
>
16-
> - 一个 QQ 号(最好不是新创建的 QQ 号)。
17-
> - 一台具有摄像功能的手机以扫码登录 QQ。
18-
19-
NapCat 提供了大量的部署方式,包括 Docker、Windows 一键安装包等等。
14+
## Deploy via One-Click Script
2015

21-
## 通过一键脚本部署
22-
23-
推荐采用这种方式部署。
16+
This deployment method is recommended.
2417

2518
### Windows
2619

27-
看这篇文章:[NapCat.Shell - Win手动启动教程](https://napneko.github.io/guide/boot/Shell#napcat-shell-win%E6%89%8B%E5%8A%A8%E5%90%AF%E5%8A%A8%E6%95%99%E7%A8%8B)
20+
Refer to this article: [NapCat.Shell - Windows Manual Start Tutorial](https://napneko.github.io/guide/boot/Shell#napcat-shell-win%E6%89%8B%E5%8A%A8%E5%90%AF%E5%8A%A8%E6%95%99%E7%A8%8B)
2821

2922
### Linux
3023

31-
看这篇文章:[NapCat.Installer - Linux一键使用脚本(支持Ubuntu 20+/Debian 10+/Centos9)](https://napneko.github.io/guide/boot/Shell#napcat-installer-linux%E4%B8%80%E9%94%AE%E4%BD%BF%E7%94%A8%E8%84%9A%E6%9C%AC-%E6%94%AF%E6%8C%81ubuntu-20-debian-10-centos9)
24+
Refer to this article: [NapCat.Installer - Linux One-Click Script (Supports Ubuntu 20+/Debian 10+/Centos9)](https://napneko.github.io/guide/boot/Shell#napcat-installer-linux%E4%B8%80%E9%94%AE%E4%BD%BF%E7%94%A8%E8%84%9A%E6%9C%AC-%E6%94%AF%E6%8C%81ubuntu-20-debian-10-centos9)
3225

3326
> [!TIP]
34-
> **Napcat WebUI 在哪打开**
35-
> 在 napcat 的日志里会显示 WebUI 链接。
27+
> **Where to open Napcat WebUI**:
28+
> The WebUI link will be displayed in napcat's logs.
3629
>
37-
> 如果是 linux 命令行一键部署的napcat:`docker log <qq号>`
30+
> If napcat is deployed via Linux command line one-click deployment: `docker log <account>`.
3831
>
39-
> Docker部署的 NapCat`docker logs napcat`
32+
> For Docker-deployed NapCat: `docker logs napcat`.
4033
41-
## 通过 Docker Compose 部署
34+
## Deploy via Docker Compose
4235

4336
> [!TIP]
44-
> 如果用 Docker Compose 部署,NapCat 侧无需配置,通过 NapCat WebUI (工作在端口 6099) `docker logs napcat` 登录,仅在 AstrBot 侧开启 aiocqhttp 适配器即可连接,并且可以直接实现文件 `语音数据``文件数据` 正常接收与发送。
37+
> If deploying with Docker Compose, no configuration is needed on the NapCat side. Just log in via NapCat WebUI (running on port 6099) or `docker logs napcat`, enable the aiocqhttp adapter on the AstrBot side to connect, and you can directly implement normal receiving and sending of `voice data` and `file data`.
4538
46-
1. 下载或复制 [astrbot.yml](https://github.com/NapNeko/NapCat-Docker/blob/main/compose/astrbot.yml) 内容
47-
2. 将刚刚下载的文件重命名为 `astrbot.yml`
48-
3. `astrbot.yml` 文件所在目录执行:
39+
1. Download or copy the content of [astrbot.yml](https://github.com/NapNeko/NapCat-Docker/blob/main/compose/astrbot.yml)
40+
2. Rename the downloaded file to `astrbot.yml`
41+
3. Execute in the directory where the `astrbot.yml` file is located:
4942

5043
```bash
5144
NAPCAT_UID=$(id -u) NAPCAT_GID=$(id -g) docker-compose -f ./astrbot.yml up -d
5245
```
5346

54-
## 通过 Docker 部署
47+
## Deploy via Docker
5548

5649
> [!TIP]
57-
> 如果用 Docker 部署,将无法正常接收到`语音数据``文件数据`。这意味着语音转文字、沙箱的文件输入功能将无法使用。可以接收到文字消息、图片消息等其他类型的消息。
50+
> If deploying with Docker, you will not be able to properly receive `voice data` and `file data`. This means voice-to-text and sandbox file input functions will not be available. You can receive text messages, image messages, and other types of messages.
5851
59-
默认您安装了 Docker
52+
This tutorial assumes you have Docker installed.
6053

61-
在终端执行以下命令即可一键部署。
54+
Execute the following command in the terminal for one-click deployment.
6255

6356
```bash
6457
docker run -d \
@@ -72,70 +65,76 @@ docker run -d \
7265
mlikiowa/napcat-docker:latest
7366
```
7467

75-
执行成功后,需要查看日志以得到登录二维码和管理面板的 URL
68+
After successful execution, you need to check the logs to get the login QR code and the management panel URL.
7669

7770
```bash
7871
docker logs napcat
7972
```
8073

81-
请复制管理面板的 URL,然后在浏览器中打开备用。
74+
Please copy the management panel URL and open it in your browser.
75+
76+
Then use the account you want to log in with to scan the QR code that appears.
77+
78+
If there are no issues during the login stage, deployment is successful.
8279

83-
然后使用你要登录的 QQ 扫描出现的二维码,即可登录。
80+
## Connect to AstrBot
8481

85-
如果登录阶段没有出现问题,即成功部署。
82+
## Configure aiocqhttp in AstrBot
8683

87-
## 连接到 AstrBot
84+
1. Enter AstrBot's management panel
85+
2. Click `Bots` in the left sidebar
86+
3. Then in the interface on the right, click `+ Create Bot`
87+
4. Select `OneBot v11`
8888

89-
## 在 AstrBot 配置 aiocqhttp
89+
Fill in the configuration items that appear:
90+
- ID(id): Fill in arbitrarily, only used to distinguish different messaging platform instances.
91+
- Enable: Check this.
92+
- Reverse WebSocket Host Address: Please fill in your machine's IP address, generally fill in `0.0.0.0` directly
93+
- Reverse WebSocket Port: Fill in a port, default is `6199`.
94+
- Reverse Websocket Token: Only needs to be filled when a token is configured in NapCat's network settings.
9095

91-
1. 进入 AstrBot 的管理面板
92-
2. 点击左边栏 `机器人`
93-
3. 然后在右边的界面中,点击 `+ 创建机器人`
94-
4. 选择 `接入QQ个人号(OneBot v11)`
96+
Example image: (At the fastest, just check Enable, then save)
9597

96-
弹出的配置项填写:
98+
<img width="818" height="799" alt="xinjianya" src="https://github.com/user-attachments/assets/813ac338-2fd7-4add-bde4-8b0f6d0bda95" />
9799

98-
配置项填写:
99100

100-
- ID(id):随意填写,用于区分不同的消息平台实例。
101-
- 启用(enable): 勾选。
102-
- 反向 WebSocket 主机地址:请填写你的机器的 IP 地址。一般情况下请直接填写 `0.0.0.0`
103-
- 反向 WebSocket 端口:填写一个端口,例如 `6199`
101+
Click `Save`.
104102

105-
点击 `保存`
103+
### Configure Administrator
106104

107-
### 配置管理员
105+
After filling in, go to the `Configuration File` page, click the `Platform Configuration` tab, find `Administrator ID`, and fill in your account number (not the bot's account number).
108106

109-
填写完毕后,进入 `配置文件` 页,点击 `平台配置` 选项卡,找到 `管理员 ID`,填写你的 QQ 号(不是机器人的 QQ 号)。
107+
Remember to click `Save` in the lower right corner, AstrBot will restart and apply the configuration.
110108

111-
切记点击右下角 `保存`,AstrBot 重启并会应用配置。
109+
### Add WebSocket Client in NapCat
112110

113-
### 在 NapCatQQ 中添加 WebSocket 客户端
111+
Switch back to NapCat's management panel, click `Network Configuration->New->WebSockets Client`.
114112

115-
切换回 NapCatQQ 的管理面板,点击 `网络配置->新建->WebSockets客户端`
113+
<img width="649" height="751" alt="jiaochenXJY" src="https://github.com/user-attachments/assets/5044f96a-a81f-407a-a3b1-0c518499eda4" />
116114

117-
![image](https://napneko.github.io/assets/use/Astrbot-onebot-2.png)
118115

119-
在新弹出的窗口中:
116+
In the newly opened window:
120117

121-
- 勾选 `启用`
122-
- `URL` 填写 `ws://宿主机IP:端口/ws`。如 `ws://localhost:6199/ws``ws://127.0.0.1:6199/ws`
118+
- Check `Enable`.
119+
- Fill in `URL` with `ws://HostIP:Port/ws`. For example, `ws://localhost:6199/ws` or `ws://127.0.0.1:6199/ws`.
123120

124-
> 注意如果是docker部署(例如用的本文档的docker-compose脚本)那么填写的应该是`ws://astrbot:6199/ws`
121+
> [!IMPORTANT]
122+
> 1. If deploying with Docker and both AstrBot and NapCat containers are connected to the same network, use `ws://astrbot:6199/ws` (refer to the Docker script in this documentation).
123+
> 2. Due to Docker network isolation, when not on the same network, please use the internal network IP address or public network IP address ***(unsafe)*** to connect, i.e., `ws://(internal/public IP):6199/ws`.
125124
126-
- 消息格式:`Array`
127-
- 心跳间隔: `5000`
128-
- 重连间隔: `5000`
125+
- Message Format: `Array`
126+
- Heartbeat Interval: `5000`
127+
- Reconnection Interval: `5000`
129128

130129
> [!WARNING]
131130
>
132-
> 1. 切记后面加一个 `/ws`!
133-
> 2. 这里的 IP 不是 `0.0.0.0`
131+
> 1. Remember to add `/ws` at the end!
132+
> 2. The IP here cannot be `0.0.0.0`
134133
135-
点击 `保存`
134+
Click `Save`.
136135

137-
前往 AstrBot WebUI `控制台`,如果出现 `aiocqhttp(OneBot v11) 适配器已连接。` 相关蓝色的日志,说明连接成功。
136+
Go to AstrBot WebUI `Console`, if you see the blue log ` aiocqhttp(OneBot v11) adapter connected.`, it means the connection is successful. If not, and after several seconds ` aiocqhttp adapter has been closed` appears, it indicates connection timeout (failed), please check if the configuration is correct.
138137

139-
## 🎉 大功告成
138+
## 🎉 All Done
140139

141-
此时,你的 AstrBot 和 NapCatQQ 应该已经连接成功。使用 `私聊` 的方式在 QQ 对机器人发送 `/help` 以检查是否连接成功。
140+
At this point, your AstrBot and NapCat should be successfully connected! Use `private message` to send `/help` to the bot to check if the connection is successful.

zh/deploy/platform/aiocqhttp/napcat.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
1-
# 通过 NapCatQQ 协议实现端接入 QQ
1+
# 使用 NapCat
22

33
> [!TIP]
44
>
55
> - 请合理控制使用频率。过于频繁地发送消息可能会被判定为异常行为,增加触发风控机制的风险。
66
> - 本项目严禁用于任何违反法律法规的用途。若您意图将 AstrBot 应用于非法产业或活动,我们**明确反对并拒绝**您使用本项目。
7-
> - AstrBot 仅提供对 OneBot v11 协议的连接,并不直接侧载 QQ
7+
> - AstrBot 通过 `aiocqhttp` 适配器接入 OneBot v11 协议。OneBot v11 协议是一个开放的通信协议,并不代表任何具体的软件或服务
88
9-
NapCatQQ 是基于无头 QQNT 的 OneBot 协议实现端。它本质上运行了一个 QQNT 实例。
10-
11-
NapCatQQ 的 GitHub 仓库:[NapCatQQ](https://github.com/NapNeko/NapCatQQ)
12-
NapCatQQ 的文档:[NapCatQQ 文档](https://napcat.napneko.icu/)
13-
14-
> [!WARNING]
15-
> 前置准备:
16-
>
17-
> - 一个 QQ 号(最好不是新创建的 QQ 号)。
18-
> - 一台具有摄像功能的手机以扫码登录 QQ。
9+
NapCat 的 GitHub 仓库:[NapCat](https://github.com/NapNeko/NapCatQQ)
10+
NapCat 的文档:[NapCat 文档](https://napcat.napneko.icu/)
1911

2012
NapCat 提供了大量的部署方式,包括 Docker、Windows 一键安装包等等。
2113

@@ -35,7 +27,7 @@ NapCat 提供了大量的部署方式,包括 Docker、Windows 一键安装包
3527
> **Napcat WebUI 在哪打开**
3628
> 在 napcat 的日志里会显示 WebUI 链接。
3729
>
38-
> 如果是 linux 命令行一键部署的napcat:`docker log <qq号>`
30+
> 如果是 linux 命令行一键部署的napcat:`docker log <账号>`
3931
>
4032
> Docker部署的 NapCat:`docker logs napcat`
4133
@@ -81,7 +73,7 @@ docker logs napcat
8173

8274
请复制管理面板的 URL,然后在浏览器中打开备用。
8375

84-
然后使用你要登录的 QQ 扫描出现的二维码,即可登录。
76+
然后使用你要登录的账号扫描出现的二维码,即可登录。
8577

8678
如果登录阶段没有出现问题,即成功部署。
8779

@@ -110,13 +102,13 @@ docker logs napcat
110102

111103
### 配置管理员
112104

113-
填写完毕后,进入 `配置文件` 页,点击 `平台配置` 选项卡,找到 `管理员 ID`填写你的 QQ 号(不是机器人的 QQ 号)。
105+
填写完毕后,进入 `配置文件` 页,点击 `平台配置` 选项卡,找到 `管理员 ID`填写你的账号号(不是机器人的账号)。
114106

115107
切记点击右下角 `保存`,AstrBot 重启并会应用配置。
116108

117-
### NapCatQQ 中添加 WebSocket 客户端
109+
### NapCat 中添加 WebSocket 客户端
118110

119-
切换回 NapCatQQ 的管理面板,点击 `网络配置->新建->WebSockets客户端`
111+
切换回 NapCat 的管理面板,点击 `网络配置->新建->WebSockets客户端`
120112

121113
<img width="649" height="751" alt="jiaochenXJY" src="https://github.com/user-attachments/assets/5044f96a-a81f-407a-a3b1-0c518499eda4" />
122114

@@ -145,4 +137,4 @@ docker logs napcat
145137

146138
## 🎉 大功告成
147139

148-
此时,你的 AstrBot 和 NapCatQQ 应该已经连接成功!使用 `私聊` 的方式在 QQ 对机器人发送 `/help` 以检查是否连接成功。
140+
此时,你的 AstrBot 和 NapCat 应该已经连接成功!使用 `私聊` 的方式对机器人发送 `/help` 以检查是否连接成功。

0 commit comments

Comments
 (0)