From c3a8dc709f0220dff45bb11a604ab7a9eebb0874 Mon Sep 17 00:00:00 2001 From: StarHeartHunt Date: Sun, 7 Mar 2021 17:55:29 +0800 Subject: [PATCH 1/5] :memo: tips for installing separated adapters --- docs/guide/cqhttp-guide.md | 7 +++++++ docs/guide/ding-guide.md | 7 +++++++ docs/guide/installation.md | 9 ++++++++- docs/guide/mirai-guide.md | 7 +++++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/docs/guide/cqhttp-guide.md b/docs/guide/cqhttp-guide.md index 356fa6c3..f0764728 100644 --- a/docs/guide/cqhttp-guide.md +++ b/docs/guide/cqhttp-guide.md @@ -1,5 +1,12 @@ # CQHTTP 协议使用指南 +## 配置 NoneBot CQHTTP 适配器 + + +```bash +pip install nonebot-adapter-cqhttp +``` + ## 配置 CQHTTP 协议端(以 QQ 为例) 单纯运行 NoneBot 实例并不会产生任何效果,因为此刻 QQ 这边还不知道 NoneBot 的存在,也就无法把消息发送给它,因此现在需要使用一个无头 QQ 来把消息等事件上报给 NoneBot。 diff --git a/docs/guide/ding-guide.md b/docs/guide/ding-guide.md index ee9449ba..1c5c031a 100644 --- a/docs/guide/ding-guide.md +++ b/docs/guide/ding-guide.md @@ -11,6 +11,13 @@ - [群机器人概述](https://developers.dingtalk.com/document/app/overview-of-group-robots) - [开发企业内部机器人](https://developers.dingtalk.com/document/app/develop-enterprise-internal-robots) +## 配置 NoneBot 钉钉 适配器 + + +```bash +pip install nonebot-adapter-ding +``` + ## 关于 DingAdapter 的说明 你需要显式的注册 ding 这个适配器: diff --git a/docs/guide/installation.md b/docs/guide/installation.md index aaf916ec..705464a1 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -1,6 +1,6 @@ # 安装 -## NoneBot +## 安装 NoneBot :::warning 注意 请确保你的 Python 版本 >= 3.7。 @@ -67,6 +67,13 @@ poetry install --no-dev # 推荐 pip install . # 不推荐 ``` +## 安装适配器 +适配器可以通过 `nb-cli` 在创建项目时根据你的选择自动安装,也可以自行使用 `pip` 安装 + +```bash +pip install nonebot-adapter- +``` + ## 安装插件 插件可以通过 `nb-cli` 进行安装,也可以自行安装并加载插件。 diff --git a/docs/guide/mirai-guide.md b/docs/guide/mirai-guide.md index c22631e0..555b9d1a 100644 --- a/docs/guide/mirai-guide.md +++ b/docs/guide/mirai-guide.md @@ -28,6 +28,13 @@ Mirai-API-HTTP 的适配器以 [AGPLv3 许可](https://opensource.org/licenses/A **为了便捷起见, 以下内容均以缩写 `MAH` 代替 `mirai-api-http`** +## 配置 NoneBot Mirai 适配器 + + +```bash +pip install nonebot-adapter-mirai +``` + ## 配置 MAH 客户端 正如你可能刚刚在[CQHTTP 协议使用指南](./cqhttp-guide.md)中所读到的: From f30b9e4fb9a2a32e5fe1ddbf78915e5fd5236e30 Mon Sep 17 00:00:00 2001 From: StarHeartHunt Date: Sun, 7 Mar 2021 17:59:25 +0800 Subject: [PATCH 2/5] :memo: tips for getting adapters list --- docs/guide/installation.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/guide/installation.md b/docs/guide/installation.md index 705464a1..1c6b5d38 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -74,6 +74,11 @@ pip install . # 不推荐 pip install nonebot-adapter- ``` +```bash +# 列出所有的适配器 +nb adapter list +``` + ## 安装插件 插件可以通过 `nb-cli` 进行安装,也可以自行安装并加载插件。 From f49a5811934622ada0288784274b6b9be29746c2 Mon Sep 17 00:00:00 2001 From: StarHeartHunt Date: Sun, 7 Mar 2021 18:01:30 +0800 Subject: [PATCH 3/5] :memo: replace inaccurate words --- docs/guide/cqhttp-guide.md | 2 +- docs/guide/ding-guide.md | 2 +- docs/guide/mirai-guide.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guide/cqhttp-guide.md b/docs/guide/cqhttp-guide.md index f0764728..49ff24e1 100644 --- a/docs/guide/cqhttp-guide.md +++ b/docs/guide/cqhttp-guide.md @@ -1,6 +1,6 @@ # CQHTTP 协议使用指南 -## 配置 NoneBot CQHTTP 适配器 +## 安装 NoneBot CQHTTP 适配器 ```bash diff --git a/docs/guide/ding-guide.md b/docs/guide/ding-guide.md index 1c5c031a..bf31df20 100644 --- a/docs/guide/ding-guide.md +++ b/docs/guide/ding-guide.md @@ -11,7 +11,7 @@ - [群机器人概述](https://developers.dingtalk.com/document/app/overview-of-group-robots) - [开发企业内部机器人](https://developers.dingtalk.com/document/app/develop-enterprise-internal-robots) -## 配置 NoneBot 钉钉 适配器 +## 安装 NoneBot 钉钉 适配器 ```bash diff --git a/docs/guide/mirai-guide.md b/docs/guide/mirai-guide.md index 555b9d1a..91bd903f 100644 --- a/docs/guide/mirai-guide.md +++ b/docs/guide/mirai-guide.md @@ -28,7 +28,7 @@ Mirai-API-HTTP 的适配器以 [AGPLv3 许可](https://opensource.org/licenses/A **为了便捷起见, 以下内容均以缩写 `MAH` 代替 `mirai-api-http`** -## 配置 NoneBot Mirai 适配器 +## 安装 NoneBot Mirai 适配器 ```bash From 61e33e24e9f6a1c52837700434f696ace02f5982 Mon Sep 17 00:00:00 2001 From: StarHeartHunt Date: Sun, 7 Mar 2021 10:04:53 +0000 Subject: [PATCH 4/5] :memo: update api docs --- docs/api/drivers/fastapi.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/api/drivers/fastapi.md b/docs/api/drivers/fastapi.md index fba15c68..3b2f4f23 100644 --- a/docs/api/drivers/fastapi.md +++ b/docs/api/drivers/fastapi.md @@ -28,7 +28,7 @@ FastAPI 驱动框架设置,详情参考 FastAPI 文档 * **说明** - openapi.json 地址,默认为 None 即关闭 + `openapi.json` 地址,默认为 `None` 即关闭 @@ -43,7 +43,7 @@ FastAPI 驱动框架设置,详情参考 FastAPI 文档 * **说明** - swagger 地址,默认为 None 即关闭 + `swagger` 地址,默认为 `None` 即关闭 @@ -58,7 +58,22 @@ FastAPI 驱动框架设置,详情参考 FastAPI 文档 * **说明** - redoc 地址,默认为 None 即关闭 + `redoc` 地址,默认为 `None` 即关闭 + + + +### `fastapi_reload_dirs` + + +* **类型** + + `List[str]` + + + +* **说明** + + `debug` 模式下重载监控文件夹列表,默认为 uvicorn 默认值 From da97a1849799e1d818fd71b8aee860c4dee6486b Mon Sep 17 00:00:00 2001 From: StarHeartHunt Date: Sun, 7 Mar 2021 18:12:14 +0800 Subject: [PATCH 5/5] :memo: remove redundant characters --- docs/guide/cqhttp-guide.md | 1 - docs/guide/ding-guide.md | 1 - docs/guide/mirai-guide.md | 1 - 3 files changed, 3 deletions(-) diff --git a/docs/guide/cqhttp-guide.md b/docs/guide/cqhttp-guide.md index 49ff24e1..867eb56f 100644 --- a/docs/guide/cqhttp-guide.md +++ b/docs/guide/cqhttp-guide.md @@ -2,7 +2,6 @@ ## 安装 NoneBot CQHTTP 适配器 - ```bash pip install nonebot-adapter-cqhttp ``` diff --git a/docs/guide/ding-guide.md b/docs/guide/ding-guide.md index bf31df20..7e1d8d01 100644 --- a/docs/guide/ding-guide.md +++ b/docs/guide/ding-guide.md @@ -13,7 +13,6 @@ ## 安装 NoneBot 钉钉 适配器 - ```bash pip install nonebot-adapter-ding ``` diff --git a/docs/guide/mirai-guide.md b/docs/guide/mirai-guide.md index 91bd903f..71003e64 100644 --- a/docs/guide/mirai-guide.md +++ b/docs/guide/mirai-guide.md @@ -30,7 +30,6 @@ Mirai-API-HTTP 的适配器以 [AGPLv3 许可](https://opensource.org/licenses/A ## 安装 NoneBot Mirai 适配器 - ```bash pip install nonebot-adapter-mirai ```