From 9a4f15a05cadfdd38bf65ee4bc3db750afddbc7e Mon Sep 17 00:00:00 2001 From: SDchao <34410782+SDchao@users.noreply.github.com> Date: Tue, 28 Jan 2020 11:23:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0API=5FROOT=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 指引中似乎没有提及使用Http通信前需要配置API_ROOT,所以加上咯 --- docs/guide/calling-cqhttp-api.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/guide/calling-cqhttp-api.md b/docs/guide/calling-cqhttp-api.md index dd80f0bf..f793fae3 100644 --- a/docs/guide/calling-cqhttp-api.md +++ b/docs/guide/calling-cqhttp-api.md @@ -6,6 +6,11 @@ [python-aiocqhttp]: https://github.com/richardchien/python-aiocqhttp +因为需要使用HTTP通信,需配置酷Q HTTP API 插件的 HTTP 接口地址。需要在config.py中添加 +```python +API_ROOT = 'http://127.0.0.1:5700' # 默认端口为5700 +``` + 要获取 bot 对象,可以通过如下两种方式: ```python