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..7fd39de 100644 --- a/template/template_config.toml +++ b/template/template_config.toml @@ -4,19 +4,17 @@ 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 = [] enable_temp = false [Debug] -level = "INFO" # 日志等级(DEBUG, INFO, WARNING, ERROR) \ No newline at end of file +level = "INFO" # 日志等级(DEBUG, INFO, WARNING, ERROR)