1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00
MiraiGo/client/sign.go
synodriver 1288c30775
添加群打卡接口 (看起来是这个包 (#273)
* group sign

* group sign

* rename pb file 0xeb7

* new proto impl
2022-05-24 13:31:07 +08:00

27 lines
758 B
Go

package client
import (
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
"github.com/Mrs4s/MiraiGo/internal/proto"
"strconv"
)
// SendGroupSign 发送群聊打卡消息
func (c *QQClient) SendGroupSign(target int64) {
_, _ = c.sendAndWait(c.buildGroupSignPacket(target, 0))
}
func (c *QQClient) buildGroupSignPacket(groupId int64, scene uint32) (uint16, []byte) {
body := &oidb.DEB7ReqBody{
SignInStatusReq: &oidb.StSignInStatusReq{
Uid: proto.Some(strconv.Itoa(int(c.Uin))),
GroupId: proto.Some(strconv.Itoa(int(groupId))),
Scene: proto.Some(scene),
ClientVersion: proto.Some("8.5.0.5025"),
},
}
b, _ := proto.Marshal(body)
payload := c.packOIDBPackage(3767, 0, b)
return c.uniPacket("OidbSvc.0xeb7", payload)
}