diff --git a/src/onebot11/constructor.ts b/src/onebot11/constructor.ts index d545c917..a8a0fd62 100644 --- a/src/onebot11/constructor.ts +++ b/src/onebot11/constructor.ts @@ -487,7 +487,7 @@ export class OB11Constructor { } if (grayTipElement.jsonGrayTipElement.busiId == 2401) { let searchParams = new URL(json[0].jp).searchParams; - let msgSeq = searchParams.get('msgSeq'); + let msgSeq = searchParams.get('msgSeq')!; let Group = searchParams.get('groupCode'); let Businessid = searchParams.get('businessid'); let Peer: Peer = { @@ -495,7 +495,8 @@ export class OB11Constructor { chatType: ChatType.group, peerUid: Group! }; - return new OB11GroupEssenceEvent(parseInt(msg.peerUid), msg.id!); + let msgData = await NTQQMsgApi.getMsgsBySeqAndCount(Peer, msgSeq.toString(), 1, true, true); + return new OB11GroupEssenceEvent(parseInt(msg.peerUid), msg.id!, parseInt(msgData.msgList[0].senderUin)); // 获取MsgSeq+Peer可获取具体消息 } if (grayTipElement.jsonGrayTipElement.busiId == 2407) { diff --git a/src/onebot11/event/notice/OB11GroupEssenceEvent.ts b/src/onebot11/event/notice/OB11GroupEssenceEvent.ts index d70ad4e9..4a4bf195 100644 --- a/src/onebot11/event/notice/OB11GroupEssenceEvent.ts +++ b/src/onebot11/event/notice/OB11GroupEssenceEvent.ts @@ -2,11 +2,13 @@ import { OB11GroupNoticeEvent } from './OB11GroupNoticeEvent'; export class OB11GroupEssenceEvent extends OB11GroupNoticeEvent { notice_type = 'essence'; message_id: number; + sender_id: number; sub_type: 'add' | 'delete' = "add"; - constructor(groupId: number, message_id: number) { + constructor(groupId: number, message_id: number, sender_id: number) { super(); this.group_id = groupId; this.message_id = message_id; + this.sender_id = sender_id; } }