chore:fix

This commit is contained in:
手瓜一十雪
2024-08-11 00:44:37 +08:00
parent e0478a2ffc
commit 87f513d9ed
7 changed files with 21 additions and 7 deletions

View File

@@ -9,6 +9,7 @@ import { MessageUnique } from '@/common/utils/MessageUnique';
import { OB11Constructor } from '@/onebot/helper/data';
import { logOB11Message } from '@/onebot/helper/log';
import { proxiedListenerOf } from '@/common/utils/proxy-handler';
import { createActionMap } from './action';
//OneBot实现类
export class NapCatOneBot11Adapter {
@@ -50,8 +51,10 @@ export class NapCatOneBot11Adapter {
this.context.logger.setLogSelfInfo(selfInfo);
}).catch(this.context.logger.logError);
this.context.logger.log(`[Notice] [OneBot11] ${serviceInfo}`);
let actions = createActionMap(this, this.core);
let OB11NetworkManagerWrap = new OB11NetworkManager();
OB11NetworkManagerWrap.registerAdapter(new OB11PassiveHttpAdapter(ob11Config.http.port, ob11Config.token, this.core, this));
OB11NetworkManagerWrap.registerAllActions(actions);
OB11NetworkManagerWrap.openAllAdapters();
// Todo 开始启动NetWork
await this.initMsgListener();