From a668bfbc1330d502f631488235dfa1cbe2529493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Fri, 15 Nov 2024 18:40:35 +0800 Subject: [PATCH] refactor: emitMsg --- src/core/external/napcat.json | 2 +- src/onebot/index.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/core/external/napcat.json b/src/core/external/napcat.json index 6abfe1e6..44952ac2 100644 --- a/src/core/external/napcat.json +++ b/src/core/external/napcat.json @@ -1,5 +1,5 @@ { - "fileLog": true, + "fileLog": false, "consoleLog": true, "fileLogLevel": "debug", "consoleLogLevel": "info", diff --git a/src/onebot/index.ts b/src/onebot/index.ts index 20f2221b..7d5d75a8 100644 --- a/src/onebot/index.ts +++ b/src/onebot/index.ts @@ -305,7 +305,7 @@ export class NapCatOneBot11Adapter { peerUid: msg.peerUid, guildId: '', }, msg.msgId); - this.emitMsg(msg, true); + this.emitMsg(msg); } } }; @@ -377,7 +377,6 @@ export class NapCatOneBot11Adapter { const member1 = await this.core.apis.GroupApi.getGroupMember(notify.group.groupCode, notify.user1.uid); this.context.logger.logDebug('有管理员变动通知'); // refreshGroupMembers(notify.group.groupCode).then(); - this.context.logger.logDebug('开始获取变动的管理员'); if (member1) { this.context.logger.logDebug('变动管理员获取成功'); @@ -497,7 +496,7 @@ export class NapCatOneBot11Adapter { ); } - private async emitMsg(message: RawMessage, selfMsg: boolean = true) { + private async emitMsg(message: RawMessage) { let network = Object.values(this.configLoader.configData.network) as Array; this.context.logger.logDebug('收到新消息 RawMessage', message); this.apis.MsgApi.parseMessageV2(message).then((ob11Msg) => {