refactor: 大部分文件处理部分

This commit is contained in:
手瓜一十雪
2025-01-13 20:30:08 +08:00
parent 0d3f5a0be5
commit a81cdb824e
12 changed files with 98 additions and 106 deletions

View File

@@ -180,8 +180,11 @@ export class NapCatOneBot11Adapter {
WebUiDataRuntime.setQQLoginStatus(true);
WebUiDataRuntime.setOnOB11ConfigChanged(async (newConfig) => {
const prev = this.configLoader.configData;
// 保证默认配置
newConfig = mergeOneBotConfigs(newConfig);
this.configLoader.save(newConfig);
this.context.logger.log(`OneBot11 配置更改:${JSON.stringify(prev)} -> ${JSON.stringify(newConfig)}`);
//this.context.logger.log(`OneBot11 配置更改:${JSON.stringify(prev)} -> ${JSON.stringify(newConfig)}`);
await this.reloadNetwork(prev, newConfig);
});
}