refactor: change method signature in legacy WebUi

This commit is contained in:
Wesley F. Young
2024-08-12 10:58:23 +08:00
parent 5dcaf67ef2
commit aefe5b0eb5
4 changed files with 35 additions and 31 deletions

View File

@@ -55,7 +55,8 @@ export class NapCatOneBot11Adapter {
FriendApi: new OneBotFriendApi(this, core),
};
this.networkManager = new OB11NetworkManager();
this.InitOneBot().then().catch(e => this.context.logger.logError('初始化OneBot失败', e));
this.InitOneBot()
.catch(e => this.context.logger.logError('初始化OneBot失败', e));
}
async InitOneBot() {
@@ -112,7 +113,7 @@ export class NapCatOneBot11Adapter {
await WebUiDataRuntime.setQQLoginUin(selfInfo.uin.toString());
await WebUiDataRuntime.setQQLoginStatus(true);
await WebUiDataRuntime.setOB11ConfigCall(async (ob11: OB11Config) => {
await WebUiDataRuntime.setOnOB11ConfigChanged(async (ob11: OB11Config) => {
this.configLoader.save(ob11);
});
}