From 0cea82e5262d8fe2560314e7715e6d9e8e553fb0 Mon Sep 17 00:00:00 2001 From: mute Date: Thu, 13 Jul 2023 16:51:57 +0800 Subject: =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=20WithGoCQHTTP=20=E4=B8=BA?= =?UTF-8?q?=20False=20=E6=97=B6=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/configs/create.py | 2 +- ATRI/configs/models.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ATRI/configs/create.py b/ATRI/configs/create.py index 1eff69b..278ef8f 100644 --- a/ATRI/configs/create.py +++ b/ATRI/configs/create.py @@ -101,7 +101,7 @@ def init_config(conf_path: Path, default_conf_path: Path): format(uin=str(uin), password=password, protocol=str(protocol))) # type: ignore else: raw_conf = raw_conf.replace("{is_use_with_gocq}", "false") - raw_conf = raw_conf.replace("{account}", "[]") + raw_conf = raw_conf.replace("{accounts}", "[]") raw_conf = raw_conf.replace("{saucenao_key}", saucenao_key) diff --git a/ATRI/configs/models.py b/ATRI/configs/models.py index b3b29c9..f024828 100644 --- a/ATRI/configs/models.py +++ b/ATRI/configs/models.py @@ -1,4 +1,4 @@ -from typing import List +from typing import List, Optional from pydantic import BaseModel @@ -24,7 +24,7 @@ class GoCQHTTPAccountList(BaseModel): class WithGoCQHTTP(BaseModel): enabled: bool - accounts: List[GoCQHTTPAccountList] + accounts: Optional[List[GoCQHTTPAccountList]] download_domain: str download_version: str gocq_webui_username: str @@ -64,7 +64,7 @@ class RuntimeConfig(BaseModel): command_start: set command_sep: set session_expire_timeout: int - gocq_accounts: list + gocq_accounts: Optional[list] gocq_download_domain: str gocq_version: str gocq_webui_username: str -- cgit v1.2.3