From be0615099056b14f872363d13a011f2581ebff5d Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Wed, 13 Mar 2024 16:53:30 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20aiocqhttp=E6=B7=BB=E5=8A=A0=E9=BB=98?= =?UTF-8?q?=E8=AE=A4access-token=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/platform/sources/aiocqhttp.py | 2 +- templates/platform.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/platform/sources/aiocqhttp.py b/pkg/platform/sources/aiocqhttp.py index 6eaa6ce9..51b3e2b4 100644 --- a/pkg/platform/sources/aiocqhttp.py +++ b/pkg/platform/sources/aiocqhttp.py @@ -216,7 +216,7 @@ class AiocqhttpAdapter(adapter.MessageSourceAdapter): self.ap = ap - if "access-token" in config and config["access-token"]: + if "access-token" in config: self.bot = aiocqhttp.CQHttp(access_token=config["access-token"]) del self.config["access-token"] else: diff --git a/templates/platform.json b/templates/platform.json index fd57c97b..b048f2f8 100644 --- a/templates/platform.json +++ b/templates/platform.json @@ -20,7 +20,8 @@ "adapter": "aiocqhttp", "enable": false, "host": "0.0.0.0", - "port": 8080 + "port": 8080, + "access-token": "" }, { "adapter": "qq-botpy",