From 17122c43608d4499eac6941554a76fa5f401f115 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: Sat, 3 Aug 2024 15:03:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=B2=BE=E7=AE=80=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/src/apis/msg.ts | 2 +- src/onebot11/action/go-cqhttp/GetGroupMsgHistory.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/src/apis/msg.ts b/src/core/src/apis/msg.ts index 820e52a9..847a9514 100644 --- a/src/core/src/apis/msg.ts +++ b/src/core/src/apis/msg.ts @@ -106,7 +106,7 @@ export class NTQQMsgApi { } | undefined> { return napCatCore.session.getMsgService().getMultiMsg(peer, rootMsgId, parentMsgId); } - static async getLastestMsgByUids(peer: Peer) { + static async getLastestMsgByUids(peer: Peer, count: number = 20) { let ret = await napCatCore.session.getMsgService().queryMsgsWithFilterEx('0', '0', '0', { chatInfo: peer, filterMsgType: [], diff --git a/src/onebot11/action/go-cqhttp/GetGroupMsgHistory.ts b/src/onebot11/action/go-cqhttp/GetGroupMsgHistory.ts index ddc061ed..15f06947 100644 --- a/src/onebot11/action/go-cqhttp/GetGroupMsgHistory.ts +++ b/src/onebot11/action/go-cqhttp/GetGroupMsgHistory.ts @@ -2,7 +2,7 @@ import BaseAction from '../BaseAction'; import { OB11Message, OB11User } from '../../types'; import { getGroup, groups } from '@/core/data'; import { ActionName } from '../types'; -import { ChatType } from '@/core/entities'; +import { ChatType, RawMessage } from '@/core/entities'; import { NTQQMsgApi } from '@/core/apis/msg'; import { OB11Constructor } from '../../constructor'; import { FromSchema, JSONSchema } from 'json-schema-to-ts'; @@ -36,13 +36,13 @@ export default class GoCQHTTPGetGroupMsgHistory extends BaseAction { msg.id = await MessageUnique.createMsg({ guildId: '', chatType: msg.chatType, peerUid: msg.peerUid }, msg.msgId); }));