mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
refactor: Shell Init
This commit is contained in:
parent
636d1103e3
commit
f6067b002f
@ -72,11 +72,8 @@ export class NapCatOneBot11Adapter {
|
||||
};
|
||||
this.actions = createActionMap(this, core);
|
||||
this.networkManager = new OB11NetworkManager();
|
||||
// this.registerNative(core, context).catch(e => this.context.logger.logWarn.bind(this.context.logger)('初始化Native失败', e)).then();
|
||||
this.InitOneBot()
|
||||
.catch(e => this.context.logger.logError.bind(this.context.logger)('初始化OneBot失败', e));
|
||||
|
||||
}
|
||||
|
||||
async InitOneBot() {
|
||||
const selfInfo = this.core.selfInfo;
|
||||
const ob11Config = this.configLoader.configData;
|
||||
|
@ -327,8 +327,12 @@ export class NapCatShell {
|
||||
};
|
||||
this.core = new NapCatCore(this.context, selfInfo);
|
||||
|
||||
// TODO: complete ob11 adapter initialization logic
|
||||
new NapCatOneBot11Adapter(this.core, this.context, pathWrapper);
|
||||
|
||||
|
||||
}
|
||||
async InitNapCat() {
|
||||
new NapCatOneBot11Adapter(this.core, this.context, this.context.pathWrapper).InitOneBot()
|
||||
.catch(e => this.context.logger.logError.bind(this.context.logger)('初始化OneBot失败', e));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user