From b132cd9b65ec7e7f2019ed6a722c7a09aafb78e1 Mon Sep 17 00:00:00 2001 From: ThinkerWen <296854007@qq.com> Date: Mon, 15 Apr 2024 14:44:44 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=8B=8D=E4=B8=80=E6=8B=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v2/apiBuilder/groupManager.go | 14 ++++++++++++++ v2/events/events.go | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/v2/apiBuilder/groupManager.go b/v2/apiBuilder/groupManager.go index 3f87332..0578009 100644 --- a/v2/apiBuilder/groupManager.go +++ b/v2/apiBuilder/groupManager.go @@ -7,6 +7,7 @@ type IGroupManager interface { GroupSystemMsgAction(MsgType int, MsgSeq, GroupCode int64) IGroupSystemMsgAction RevokeMsg() IGroupManager ToGUin(Uin int64) IGroupManager + ToGroupCode(Uin int64) IGroupManager MsgSeq(MsgSeq int64) IGroupManager MsgRandom(MsgRandom int64) IGroupManager ProhibitedUser() IGroupManager @@ -14,6 +15,7 @@ type IGroupManager interface { ShutTime(ShutTime int) IGroupManager RemoveUser() IGroupManager RenameUserNickName(NickName string) IGroupManager + Pat(Uin int64) IGroupManager } type IGroupSystemMsgAction interface { DoApi @@ -97,6 +99,11 @@ func (b *Builder) ToGUin(Uin int64) IGroupManager { return b } +func (b *Builder) ToGroupCode(GroupCode int64) IGroupManager { + b.CgiRequest.GroupCode = &GroupCode + return b +} + func (b *Builder) ToUid(Uid string) IGroupManager { b.CgiRequest.Uid = &Uid return b @@ -141,3 +148,10 @@ func (b *Builder) RenameUserNickName(NickName string) IGroupManager { return b } + +func (b *Builder) Pat(Uin int64) IGroupManager { + cmd := "SsoGroup.Op.Pat" + b.CgiCmd = &cmd + b.CgiRequest.Uin = &Uin + return b +} diff --git a/v2/events/events.go b/v2/events/events.go index 9bfd044..b06483a 100644 --- a/v2/events/events.go +++ b/v2/events/events.go @@ -73,6 +73,7 @@ type IGroupMsg interface { GetSenderNick() string GetSenderUin() int64 GetSenderUid() string + GetToUin() int64 ParseTextMsg() ITextMsg ParsePicMsg() IPicMsg ContainedPic() bool @@ -260,6 +261,9 @@ func (e *EventStruct) GetSenderUin() int64 { func (e *EventStruct) GetSenderUid() string { return e.CurrentPacket.EventData.MsgHead.SenderUid } +func (e *EventStruct) GetToUin() int64 { + return e.CurrentPacket.EventData.MsgHead.ToUin +} func (e *EventStruct) GetSenderNick() string { return e.CurrentPacket.EventData.MsgHead.SenderNick }