@@ -542,33 +542,38 @@ func (ctx *Ctx) GetThisGroupAtAllRemain() gjson.Result {
542
542
543
543
// GetGroupMessageHistory 获取群消息历史记录
544
544
// https://github.com/Mrs4s/go-cqhttp/blob/master/docs/cqhttp.md#%E8%8E%B7%E5%8F%96%E7%BE%A4%E6%B6%88%E6%81%AF%E5%8E%86%E5%8F%B2%E8%AE%B0%E5%BD%95
545
+ // https://napcat.apifox.cn/226657401e0
545
546
//
546
- // messageID: 起始消息序号, 可通过 get_msg 获得
547
- func (ctx * Ctx ) GetGroupMessageHistory (groupID , messageID int64 ) gjson.Result {
547
+ // messageID: 起始消息序号, 可通过 get_msg 获得, 添加count和reverseOrder参数
548
+ func (ctx * Ctx ) GetGroupMessageHistory (groupID , messageID , count int64 , reverseOrder bool ) gjson.Result {
548
549
return ctx .CallAction ("get_group_msg_history" , Params {
549
- "group_id" : groupID ,
550
- "message_seq" : messageID , // 兼容旧版本
551
- "message_id" : messageID ,
550
+ "group_id" : groupID ,
551
+ "message_seq" : messageID , // 兼容旧版本
552
+ "message_id" : messageID ,
553
+ "count" : count , // 兼容napcat
554
+ "reverseOrder" : reverseOrder , // 兼容napcat
552
555
}).Data
553
556
}
554
557
555
558
// GettLatestGroupMessageHistory 获取最新群消息历史记录
556
- func (ctx * Ctx ) GetLatestGroupMessageHistory (groupID int64 ) gjson.Result {
559
+ func (ctx * Ctx ) GetLatestGroupMessageHistory (groupID , count int64 , reverseOrder bool ) gjson.Result {
557
560
return ctx .CallAction ("get_group_msg_history" , Params {
558
- "group_id" : groupID ,
561
+ "group_id" : groupID ,
562
+ "count" : count , // 兼容napcat
563
+ "reverseOrder" : reverseOrder , // 兼容napcat
559
564
}).Data
560
565
}
561
566
562
567
// GetThisGroupMessageHistory 获取本群消息历史记录
563
568
//
564
569
// messageID: 起始消息序号, 可通过 get_msg 获得
565
- func (ctx * Ctx ) GetThisGroupMessageHistory (messageID int64 ) gjson.Result {
566
- return ctx .GetGroupMessageHistory (ctx .Event .GroupID , messageID )
570
+ func (ctx * Ctx ) GetThisGroupMessageHistory (messageID , count int64 , reverseOrder bool ) gjson.Result {
571
+ return ctx .GetGroupMessageHistory (ctx .Event .GroupID , messageID , count , reverseOrder )
567
572
}
568
573
569
574
// GettLatestThisGroupMessageHistory 获取最新本群消息历史记录
570
- func (ctx * Ctx ) GetLatestThisGroupMessageHistory () gjson.Result {
571
- return ctx .GetLatestGroupMessageHistory (ctx .Event .GroupID )
575
+ func (ctx * Ctx ) GetLatestThisGroupMessageHistory (count int64 , reverseOrder bool ) gjson.Result {
576
+ return ctx .GetLatestGroupMessageHistory (ctx .Event .GroupID , count , reverseOrder )
572
577
}
573
578
574
579
// GetGroupEssenceMessageList 获取群精华消息列表
0 commit comments