diff --git a/src/onebot11/action/go-cqhttp/GetGroupMsgHistory.ts b/src/onebot11/action/go-cqhttp/GetGroupMsgHistory.ts index e264cd32..c1f43021 100644 --- a/src/onebot11/action/go-cqhttp/GetGroupMsgHistory.ts +++ b/src/onebot11/action/go-cqhttp/GetGroupMsgHistory.ts @@ -18,7 +18,7 @@ const SchemaData = { message_seq: { type: 'number' }, count: { type: 'number' } }, - required: ['group_id', 'message_seq', 'count'] + required: ['group_id', 'count'] } as const satisfies JSONSchema; type Payload = FromSchema; @@ -31,7 +31,7 @@ export default class GoCQHTTPGetGroupMsgHistory extends BaseAction { const replyMsgM = MessageUnique.getMsgIdAndPeerByShortId(parseInt(id)); + if (!replyMsgM) { + logWarn('回复消息不存在', id); + return undefined; + } const replyMsg = (await NTQQMsgApi.getMsgsByMsgId(replyMsgM?.Peer!, [replyMsgM?.MsgId!])).msgList[0]; return replyMsg ? SendMsgElementConstructor.reply(replyMsg.msgSeq, replyMsg.msgId, replyMsg.senderUin!, replyMsg.senderUin!) :