mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-06 03:46:10 +08:00
update doc
This commit is contained in:
parent
f5b0b28331
commit
507fc1a69e
@ -1,7 +1,7 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
cq-http:
|
go-cqhttp:
|
||||||
image: felinae98/go-cqhttp-ffmpeg
|
image: felinae98/go-cqhttp-ffmpeg
|
||||||
volumes:
|
volumes:
|
||||||
- ./bot-data:/data
|
- ./bot-data:/data
|
||||||
@ -19,4 +19,4 @@ services:
|
|||||||
HK_REPORTER_BROWSER: ws://browserless:3000
|
HK_REPORTER_BROWSER: ws://browserless:3000
|
||||||
depends_on:
|
depends_on:
|
||||||
- browserless
|
- browserless
|
||||||
- cq-http
|
- go-cqhttp
|
||||||
|
@ -14,9 +14,9 @@ sidebar: auto
|
|||||||
```bash
|
```bash
|
||||||
wget https://raw.githubusercontent.com/felinae98/nonebot-hk-reporter/main/docker-compose.yml
|
wget https://raw.githubusercontent.com/felinae98/nonebot-hk-reporter/main/docker-compose.yml
|
||||||
```
|
```
|
||||||
2. 运行配置cq-http
|
2. 运行配置go-cqhttp
|
||||||
```bash
|
```bash
|
||||||
docker-compose run cq-http
|
docker-compose run go-cqhttp
|
||||||
```
|
```
|
||||||
通信方式选择:`3: 反向 Websocket 通信`
|
通信方式选择:`3: 反向 Websocket 通信`
|
||||||
编辑`bot-data/config.yml`,更改下面字段:
|
编辑`bot-data/config.yml`,更改下面字段:
|
||||||
@ -25,18 +25,21 @@ sidebar: auto
|
|||||||
uin: <QQ号> # QQ账号
|
uin: <QQ号> # QQ账号
|
||||||
password: "<QQ密码>" # 密码为空时使用扫码登录
|
password: "<QQ密码>" # 密码为空时使用扫码登录
|
||||||
|
|
||||||
|
message:
|
||||||
|
post-format: array
|
||||||
|
|
||||||
............
|
............
|
||||||
|
|
||||||
servers:
|
servers:
|
||||||
- ws-reverse:
|
- ws-reverse:
|
||||||
universal: ws://nonebot:8080/cqhttp/ws # 将这个字段写为这个值
|
universal: ws://nonebot:8080/cqhttp/ws # 将这个字段写为这个值
|
||||||
```
|
```
|
||||||
3. 登录cq-http
|
3. 登录go-cqhttp
|
||||||
再次
|
再次
|
||||||
```bash
|
```bash
|
||||||
docker-compose run cq-http
|
docker-compose run go-cqhttp
|
||||||
```
|
```
|
||||||
参考[cq-http文档](https://docs.go-cqhttp.org/faq/slider.html#%E6%96%B9%E6%A1%88a-%E8%87%AA%E8%A1%8C%E6%8A%93%E5%8C%85)
|
参考[go-cqhttp文档](https://docs.go-cqhttp.org/faq/slider.html#%E6%96%B9%E6%A1%88a-%E8%87%AA%E8%A1%8C%E6%8A%93%E5%8C%85)
|
||||||
完成登录
|
完成登录
|
||||||
4. 确定完成登录后,启动bot:
|
4. 确定完成登录后,启动bot:
|
||||||
```bash
|
```bash
|
||||||
@ -46,6 +49,7 @@ sidebar: auto
|
|||||||
本项目的docker镜像为`felinae98/nonebot-hk-reporter`,可以直接pull后run进行使用,
|
本项目的docker镜像为`felinae98/nonebot-hk-reporter`,可以直接pull后run进行使用,
|
||||||
相关配置参数可以使用`-e`作为环境变量传入
|
相关配置参数可以使用`-e`作为环境变量传入
|
||||||
#### 直接运行(不推荐)
|
#### 直接运行(不推荐)
|
||||||
|
可以参考[nonebot的运行方法](https://v2.nonebot.dev/guide/getting-started.html)
|
||||||
::: danger
|
::: danger
|
||||||
本项目中使用了Python 3.9的语法,如果出现问题,请检查Python版本
|
本项目中使用了Python 3.9的语法,如果出现问题,请检查Python版本
|
||||||
:::
|
:::
|
||||||
@ -61,6 +65,7 @@ sidebar: auto
|
|||||||
### 自动安装
|
### 自动安装
|
||||||
使用`nb-cli`执行:`nb plugin install nonebot_hk_reporter`
|
使用`nb-cli`执行:`nb plugin install nonebot_hk_reporter`
|
||||||
## 配置
|
## 配置
|
||||||
|
可参考[源文件](https://github.com/felinae98/nonebot-hk-reporter/blob/main/src/plugins/nonebot_hk_reporter/plugin_config.py)
|
||||||
* `HK_REPORTER_CONFIG_PATH`: 插件存放配置文件的位置,如果不设定默认为项目目录下的`data`目录
|
* `HK_REPORTER_CONFIG_PATH`: 插件存放配置文件的位置,如果不设定默认为项目目录下的`data`目录
|
||||||
* `HK_REPORTER_USE_PIC`: 将文字渲染成图片后进行发送,多用于规避风控
|
* `HK_REPORTER_USE_PIC`: 将文字渲染成图片后进行发送,多用于规避风控
|
||||||
* `HK_REPORTER_BROWSER`: 在某些情况下需要使用到chrome进行渲染
|
* `HK_REPORTER_BROWSER`: 在某些情况下需要使用到chrome进行渲染
|
||||||
|
Loading…
x
Reference in New Issue
Block a user