refactor: Init Core

This commit is contained in:
手瓜一十雪
2024-11-14 10:43:37 +08:00
parent bf6a101a13
commit 1ad0e346a6
3 changed files with 9 additions and 7 deletions

View File

@@ -292,7 +292,7 @@ export async function NCoreInitShell() {
fs.mkdirSync(dataPath, { recursive: true });
logger.logDebug('本账号数据/缓存目录:', accountDataPath);
new NapCatShell(
await new NapCatShell(
wrapper,
session,
logger,
@@ -331,6 +331,7 @@ export class NapCatShell {
}
async InitNapCat() {
await this.core.initCore();
new NapCatOneBot11Adapter(this.core, this.context, this.context.pathWrapper).InitOneBot()
.catch(e => this.context.logger.logError.bind(this.context.logger)('初始化OneBot失败', e));
}