github.com/LagrangeDev/LagrangeGo@v0.0.0-20240512064304-ad4a85e10cb4/client/packets/oidb/SetGroupRequest.go (about) 1 package oidb 2 3 import ( 4 "github.com/LagrangeDev/LagrangeGo/client/packets/pb/service/oidb" 5 "github.com/RomiChan/protobuf/proto" 6 ) 7 8 func BuildSetGroupRequestReq(accept bool, sequence uint64, typ uint32, groupUin uint32, message string) (*OidbPacket, error) { 9 var acceptInt uint32 10 if accept { 11 acceptInt = 1 12 } else { 13 acceptInt = 2 14 } 15 body := oidb.OidbSvcTrpcTcp0X10C8_1{ 16 Accept: acceptInt, 17 Body: &oidb.OidbSvcTrpcTcp0X10C8_1Body{ 18 Sequence: sequence, 19 EventType: typ, 20 GroupUin: groupUin, 21 Message: proto.Some(message), 22 }, 23 } 24 return BuildOidbPacket(0x10C8, 1, body, false, false) 25 } 26 27 func ParseSetGroupRequestResp(data []byte) error { 28 return CheckError(data) 29 }