Skip to content

Commit

Permalink
fix: error
Browse files Browse the repository at this point in the history
  • Loading branch information
MliKiowa committed Nov 17, 2024
1 parent 372452f commit 6c46cdd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/onebot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,11 @@ export class NapCatOneBot11Adapter {
private async emitMsg(message: RawMessage) {
const network = Object.values(this.configLoader.configData.network).flat() as Array<AdapterConfigWrap>;
this.context.logger.logDebug('收到新消息 RawMessage', message);
await this.handleMsg(message, network);
await this.handleGroupEvent(message);
await this.handlePrivateMsgEvent(message);
}
private async handleMsg(message: RawMessage, network: Array<AdapterConfigWrap>) {
try {
const ob11Msg = await this.apis.MsgApi.parseMessageV2(message);
if (ob11Msg) {
Expand All @@ -559,11 +564,8 @@ export class NapCatOneBot11Adapter {
} catch (e) {
this.context.logger.logError('constructMessage error: ', e);
}

this.handleGroupEvent(message);
this.handlePrivateMsgEvent(message);
}

private isSelfMessage(ob11Msg: {
stringMsg: OB11Message;
arrayMsg: OB11Message;
Expand Down

0 comments on commit 6c46cdd

Please sign in to comment.