refactor: emitMsg

This commit is contained in:
手瓜一十雪 2024-11-15 18:40:35 +08:00
parent bc0fc96b9b
commit a668bfbc13
2 changed files with 3 additions and 4 deletions

View File

@ -1,5 +1,5 @@
{
"fileLog": true,
"fileLog": false,
"consoleLog": true,
"fileLogLevel": "debug",
"consoleLogLevel": "info",

View File

@ -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<typeof this.configLoader.configData.network[keyof typeof this.configLoader.configData.network]>;
this.context.logger.logDebug('收到新消息 RawMessage', message);
this.apis.MsgApi.parseMessageV2(message).then((ob11Msg) => {