mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-16 15:50:22 +08:00
Update getting-started.md
Change the order of warning,makes it more logical
This commit is contained in:
parent
2098873cf2
commit
005f58bca9
@ -47,6 +47,10 @@ Running on https://127.0.0.1:8080 (CTRL + C to quit)
|
||||
|
||||
如果你在之前已经按照 [安装](/guide/installation.md) 的建议使用默认配置运行了一次 CoolQ HTTP API 插件,此时 酷Q 的 `data/app/io.github.richardchien.coolqhttpapi/config/` 目录中应该已经有了一个名为 `<user-id>.json` 的文件(`<user-id>` 为你登录的 QQ 账号)。修改这个文件,**修改如下配置项(如果不存在相应字段则添加)**:
|
||||
|
||||
::: warning 注意
|
||||
如果使用 CoolQ HTTP API 插件官方 Docker 镜像运行 酷Q,则配置文件所在目录可能是 `app/io.github.richardchien.coolqhttpapi/config/`。
|
||||
:::
|
||||
|
||||
```json
|
||||
{
|
||||
"ws_reverse_api_url": "ws://127.0.0.1:8080/ws/api/",
|
||||
@ -59,10 +63,6 @@ Running on https://127.0.0.1:8080 (CTRL + C to quit)
|
||||
**这里的 `127.0.0.1:8080` 对应 `nonebot.run()` 中传入的 `host` 和 `port`**,如果在 `nonebot.run()` 中传入的 `host` 是 `0.0.0.0`,则插件的配置中需使用任意一个能够访问到 NoneBot 所在环境的 IP,**不要直接填 `0.0.0.0`**。特别地,如果你的 酷Q 运行在 Docker 容器中,NoneBot 运行在宿主机中,则默认情况下这里需使用 `172.17.0.1`(即宿主机在 Docker 默认网桥上的 IP,不同机器有可能不同,如果是 macOS 系统或者 Windows 系统,可以考虑使用 `host.docker.internal`,具体解释详见 Docker 文档的 [Use cases and workarounds](https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds) 的「I WANT TO CONNECT FROM A CONTAINER TO A SERVICE ON THE HOST」小标题)。
|
||||
:::
|
||||
|
||||
::: warning 注意
|
||||
如果使用 CoolQ HTTP API 插件官方 Docker 镜像运行 酷Q,则配置文件所在目录可能是 `app/io.github.richardchien.coolqhttpapi/config/`。
|
||||
:::
|
||||
|
||||
修改之后,在 酷Q 的应用菜单中重启 CoolQ HTTP API 插件,或直接重启 酷Q,以使新的配置文件生效。
|
||||
|
||||
## 历史性的第一次对话
|
||||
|
Loading…
x
Reference in New Issue
Block a user