From c5bd7297e25e9fd498baef14805767b6bffd8fba Mon Sep 17 00:00:00 2001 From: UnCLAS-Prommer Date: Sat, 12 Apr 2025 08:56:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.py | 3 +-- template/template_config.toml | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/config.py b/src/config.py index 856a92a..45ced20 100644 --- a/src/config.py +++ b/src/config.py @@ -27,7 +27,6 @@ class Config: "Nickname", "Napcat_Server", "MaiBot_Server", - "Napcat", "Debug" ] if os.path.exists(self.config_path): @@ -48,7 +47,7 @@ class Config: if not self.platform: logger.critical("请在配置文件中指定平台") sys.exit(1) - self.napcat_heartbeat_interval = raw_config["Napcat"].get("interval", 30) + self.napcat_heartbeat_interval = raw_config["Napcat_Server"].get("heartbeat", 30) self.mai_host = raw_config["MaiBot_Server"].get("host", "localhost") self.mai_port = raw_config["MaiBot_Server"].get("port", 8000) self.debug_level = raw_config["Debug"].get("debug_level", "INFO") diff --git a/template/template_config.toml b/template/template_config.toml index 1003a83..c38cc0a 100644 --- a/template/template_config.toml +++ b/template/template_config.toml @@ -4,15 +4,13 @@ nickname = "" [Napcat_Server] # Napcat连接的ws服务设置 host = "localhost" # Napcat设定的url地址 port = 8095 # Napcat设定的ws端口 +heartbeat = 30 # 与Napcat设置的心跳相同(按秒计) [MaiBot_Server] # 连接麦麦的ws服务设置 platform_name = "qq" # 标识adapter的名称(必填) host = "localhost" # 麦麦在.env文件中设置的url地址 port = 8000 # 麦麦在.env文件中设置的ws端口 -[Napcat] -heartbeat = 30 # 与Napcat设置的心跳相同(按秒计) - [Whitelist] # 白名单功能(未启用)(未实现) group_list = [] private_list = []