Merge branch 'MaiM-with-u:main' into main

pull/4/head
infinitycat 2025-04-12 15:33:35 +08:00 committed by GitHub
commit 3f868b591d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 6 deletions

View File

@ -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")

View File

@ -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
level = "INFO" # 日志等级DEBUG, INFO, WARNING, ERROR