From c275806c62a4cde69d3af338a1e086a2eda04df0 Mon Sep 17 00:00:00 2001 From: synodriver Date: Fri, 27 May 2022 17:10:23 +0800 Subject: [PATCH] add group_id for get_forward_msg (#1510) --- coolq/api.go | 14 ++++++++++++-- modules/api/api.go | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/coolq/api.go b/coolq/api.go index 8332ac9..fd2566e 100644 --- a/coolq/api.go +++ b/coolq/api.go @@ -1572,8 +1572,9 @@ func (bot *CQBot) CQGetForwardMessage(resID string) global.MSG { "user_id": n.SenderId, "nickname": n.SenderName, }, - "time": n.Time, - "content": content, + "time": n.Time, + "content": content, + "group_id": n.GroupId, } } return r @@ -1973,6 +1974,15 @@ func (bot *CQBot) CQGetModelShow(model string) global.MSG { }) } +// CQSendGroupSign 群打卡 +// +// https://club.vip.qq.com/onlinestatus/set +// @route(send_group_sign) +func (bot *CQBot) CQSendGroupSign(groupID int64) global.MSG { + bot.Client.SendGroupSign(groupID) + return OK(nil) +} + // CQSetModelShow 设置在线机型 // // https://club.vip.qq.com/onlinestatus/set diff --git a/modules/api/api.go b/modules/api/api.go index 63d087e..ae4e928 100644 --- a/modules/api/api.go +++ b/modules/api/api.go @@ -210,6 +210,9 @@ func (c *Caller) call(action string, p Getter) global.MSG { p1 := p.Get("message") p2 := p.Get("auto_escape").Bool() return c.bot.CQSendGroupMessage(p0, p1, p2) + case "send_group_sign": + p0 := p.Get("group_id").Int() + return c.bot.CQSendGroupSign(p0) case "send_guild_channel_msg": p0 := p.Get("guild_id").Uint() p1 := p.Get("channel_id").Uint()