mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
feat: GetGuildMemberProfileInfo
This commit is contained in:
parent
2d2f716be3
commit
fdc30b3104
@ -17,6 +17,8 @@ type (
|
|||||||
ChannelCount uint32
|
ChannelCount uint32
|
||||||
// Guilds 由服务器推送的频道列表
|
// Guilds 由服务器推送的频道列表
|
||||||
Guilds []*GuildInfo
|
Guilds []*GuildInfo
|
||||||
|
|
||||||
|
c *QQClient
|
||||||
}
|
}
|
||||||
|
|
||||||
// GuildInfo 频道信息
|
// GuildInfo 频道信息
|
||||||
@ -38,6 +40,13 @@ type (
|
|||||||
Role int32 // 0 = member 1 = admin 2 = owner ?
|
Role int32 // 0 = member 1 = admin 2 = owner ?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GuildMemberProfile struct {
|
||||||
|
TinyId uint64
|
||||||
|
Nickname string
|
||||||
|
AvatarUrl string
|
||||||
|
JoinTime int64
|
||||||
|
}
|
||||||
|
|
||||||
// ChannelInfo 子频道信息
|
// ChannelInfo 子频道信息
|
||||||
ChannelInfo struct {
|
ChannelInfo struct {
|
||||||
ChannelId uint64
|
ChannelId uint64
|
||||||
@ -69,10 +78,10 @@ func (c *QQClient) syncChannelFirstView() {
|
|||||||
c.ChannelService.ChannelCount = firstViewRsp.GetGuildCount()
|
c.ChannelService.ChannelCount = firstViewRsp.GetGuildCount()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *QQClient) GetGuildMembers(guildId uint64) (bots []*GuildMemberInfo, members []*GuildMemberInfo, admins []*GuildMemberInfo, err error) {
|
func (s *ChannelService) GetGuildMembers(guildId uint64) (bots []*GuildMemberInfo, members []*GuildMemberInfo, admins []*GuildMemberInfo, err error) {
|
||||||
seq := c.nextSeq()
|
seq := s.c.nextSeq()
|
||||||
u1 := uint32(1)
|
u1 := uint32(1)
|
||||||
payload := c.packOIDBPackage(3931, 1, binary.EncodeDynamicProtoMessage(binary.DynamicProtoMessage{ // todo: 可能还需要处理翻页的情况?
|
payload := s.c.packOIDBPackage(3931, 1, binary.EncodeDynamicProtoMessage(binary.DynamicProtoMessage{ // todo: 可能还需要处理翻页的情况?
|
||||||
1: guildId, // guild id
|
1: guildId, // guild id
|
||||||
2: uint32(3),
|
2: uint32(3),
|
||||||
3: uint32(0),
|
3: uint32(0),
|
||||||
@ -83,8 +92,8 @@ func (c *QQClient) GetGuildMembers(guildId uint64) (bots []*GuildMemberInfo, mem
|
|||||||
8: uint32(500), // max response?
|
8: uint32(500), // max response?
|
||||||
14: uint32(2),
|
14: uint32(2),
|
||||||
}))
|
}))
|
||||||
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvcTrpcTcp.0xf5b_1", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xf5b_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
|
||||||
rsp, err := c.sendAndWaitDynamic(seq, packet)
|
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, nil, errors.Wrap(err, "send packet error")
|
return nil, nil, nil, errors.Wrap(err, "send packet error")
|
||||||
}
|
}
|
||||||
@ -117,6 +126,41 @@ func (c *QQClient) GetGuildMembers(guildId uint64) (bots []*GuildMemberInfo, mem
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *ChannelService) GetGuildMemberProfileInfo(guildId, tinyId uint64) (*GuildMemberProfile, error) {
|
||||||
|
seq := s.c.nextSeq()
|
||||||
|
flags := binary.DynamicProtoMessage{}
|
||||||
|
for i := 3; i <= 29; i++ {
|
||||||
|
flags[uint64(i)] = uint32(1)
|
||||||
|
}
|
||||||
|
flags[99] = uint32(1)
|
||||||
|
flags[100] = uint32(1)
|
||||||
|
payload := s.c.packOIDBPackage(3976, 1, binary.EncodeDynamicProtoMessage(binary.DynamicProtoMessage{
|
||||||
|
1: flags,
|
||||||
|
3: tinyId,
|
||||||
|
4: guildId,
|
||||||
|
}))
|
||||||
|
packet := packets.BuildUniPacket(s.c.Uin, seq, "OidbSvcTrpcTcp.0xf88_1", 1, s.c.OutGoingPacketSessionId, []byte{}, s.c.sigInfo.d2Key, payload)
|
||||||
|
rsp, err := s.c.sendAndWaitDynamic(seq, packet)
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.Wrap(err, "send packet error")
|
||||||
|
}
|
||||||
|
pkg := new(oidb.OIDBSSOPkg)
|
||||||
|
oidbRsp := new(channel.ChannelOidb0Xf88Rsp)
|
||||||
|
if err = proto.Unmarshal(rsp, pkg); err != nil {
|
||||||
|
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
|
||||||
|
}
|
||||||
|
if err = proto.Unmarshal(pkg.Bodybuffer, oidbRsp); err != nil {
|
||||||
|
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
|
||||||
|
}
|
||||||
|
// todo: 解析个性档案
|
||||||
|
return &GuildMemberProfile{
|
||||||
|
TinyId: tinyId,
|
||||||
|
Nickname: oidbRsp.Profile.GetNickname(),
|
||||||
|
AvatarUrl: oidbRsp.Profile.GetAvatarUrl(),
|
||||||
|
JoinTime: oidbRsp.Profile.GetJoinTime(),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *QQClient) buildSyncChannelFirstViewPacket() (uint16, []byte) {
|
func (c *QQClient) buildSyncChannelFirstViewPacket() (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := &channel.FirstViewReq{
|
req := &channel.FirstViewReq{
|
||||||
@ -159,7 +203,7 @@ func decodeChannelPushFirstView(c *QQClient, _ *incomingPacketInfo, payload []by
|
|||||||
AtAllSeq: meta.GetAtAllSeq(),
|
AtAllSeq: meta.GetAtAllSeq(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
info.Bots, info.Members, info.Admins, _ = c.GetGuildMembers(info.GuildId)
|
info.Bots, info.Members, info.Admins, _ = c.ChannelService.GetGuildMembers(info.GuildId)
|
||||||
c.ChannelService.Guilds = append(c.ChannelService.Guilds, info)
|
c.ChannelService.Guilds = append(c.ChannelService.Guilds, info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,6 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient {
|
|||||||
RandomKey: make([]byte, 16),
|
RandomKey: make([]byte, 16),
|
||||||
OutGoingPacketSessionId: []byte{0x02, 0xB0, 0x5B, 0x8B},
|
OutGoingPacketSessionId: []byte{0x02, 0xB0, 0x5B, 0x8B},
|
||||||
TCP: &utils.TCPListener{},
|
TCP: &utils.TCPListener{},
|
||||||
ChannelService: &ChannelService{},
|
|
||||||
sigInfo: &loginSigInfo{},
|
sigInfo: &loginSigInfo{},
|
||||||
requestPacketRequestID: 1921334513,
|
requestPacketRequestID: 1921334513,
|
||||||
groupSeq: int32(rand.Intn(20000)),
|
groupSeq: int32(rand.Intn(20000)),
|
||||||
@ -214,6 +213,7 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient {
|
|||||||
alive: true,
|
alive: true,
|
||||||
ecdh: crypto.NewEcdh(),
|
ecdh: crypto.NewEcdh(),
|
||||||
}
|
}
|
||||||
|
cli.ChannelService = &ChannelService{c: cli}
|
||||||
cli.ecdh.FetchPubKey(uin)
|
cli.ecdh.FetchPubKey(uin)
|
||||||
cli.UseDevice(SystemDeviceInfo)
|
cli.UseDevice(SystemDeviceInfo)
|
||||||
sso, err := getSSOAddress()
|
sso, err := getSSOAddress()
|
||||||
|
@ -93,6 +93,53 @@ func (x *ChannelOidb0Xf5BRsp) GetAdminInfo() *GuildAdminInfo {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ChannelOidb0Xf88Rsp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Profile *GuildMemberProfile `protobuf:"bytes,1,opt,name=profile" json:"profile,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChannelOidb0Xf88Rsp) Reset() {
|
||||||
|
*x = ChannelOidb0Xf88Rsp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_unknown_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChannelOidb0Xf88Rsp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ChannelOidb0Xf88Rsp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ChannelOidb0Xf88Rsp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_unknown_proto_msgTypes[1]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use ChannelOidb0Xf88Rsp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ChannelOidb0Xf88Rsp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_unknown_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChannelOidb0Xf88Rsp) GetProfile() *GuildMemberProfile {
|
||||||
|
if x != nil {
|
||||||
|
return x.Profile
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type GuildAdminInfo struct {
|
type GuildAdminInfo struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -104,7 +151,7 @@ type GuildAdminInfo struct {
|
|||||||
func (x *GuildAdminInfo) Reset() {
|
func (x *GuildAdminInfo) Reset() {
|
||||||
*x = GuildAdminInfo{}
|
*x = GuildAdminInfo{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_unknown_proto_msgTypes[1]
|
mi := &file_unknown_proto_msgTypes[2]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -117,7 +164,7 @@ func (x *GuildAdminInfo) String() string {
|
|||||||
func (*GuildAdminInfo) ProtoMessage() {}
|
func (*GuildAdminInfo) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *GuildAdminInfo) ProtoReflect() protoreflect.Message {
|
func (x *GuildAdminInfo) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_unknown_proto_msgTypes[1]
|
mi := &file_unknown_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -130,7 +177,7 @@ func (x *GuildAdminInfo) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use GuildAdminInfo.ProtoReflect.Descriptor instead.
|
// Deprecated: Use GuildAdminInfo.ProtoReflect.Descriptor instead.
|
||||||
func (*GuildAdminInfo) Descriptor() ([]byte, []int) {
|
func (*GuildAdminInfo) Descriptor() ([]byte, []int) {
|
||||||
return file_unknown_proto_rawDescGZIP(), []int{1}
|
return file_unknown_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GuildAdminInfo) GetAdmins() []*GuildMemberInfo {
|
func (x *GuildAdminInfo) GetAdmins() []*GuildMemberInfo {
|
||||||
@ -155,7 +202,7 @@ type GuildMemberInfo struct {
|
|||||||
func (x *GuildMemberInfo) Reset() {
|
func (x *GuildMemberInfo) Reset() {
|
||||||
*x = GuildMemberInfo{}
|
*x = GuildMemberInfo{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_unknown_proto_msgTypes[2]
|
mi := &file_unknown_proto_msgTypes[3]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -168,7 +215,7 @@ func (x *GuildMemberInfo) String() string {
|
|||||||
func (*GuildMemberInfo) ProtoMessage() {}
|
func (*GuildMemberInfo) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *GuildMemberInfo) ProtoReflect() protoreflect.Message {
|
func (x *GuildMemberInfo) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_unknown_proto_msgTypes[2]
|
mi := &file_unknown_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -181,7 +228,7 @@ func (x *GuildMemberInfo) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use GuildMemberInfo.ProtoReflect.Descriptor instead.
|
// Deprecated: Use GuildMemberInfo.ProtoReflect.Descriptor instead.
|
||||||
func (*GuildMemberInfo) Descriptor() ([]byte, []int) {
|
func (*GuildMemberInfo) Descriptor() ([]byte, []int) {
|
||||||
return file_unknown_proto_rawDescGZIP(), []int{2}
|
return file_unknown_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GuildMemberInfo) GetTitle() string {
|
func (x *GuildMemberInfo) GetTitle() string {
|
||||||
@ -219,6 +266,78 @@ func (x *GuildMemberInfo) GetTinyId() uint64 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GuildMemberProfile struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
TinyId *uint64 `protobuf:"varint,2,opt,name=tinyId" json:"tinyId,omitempty"`
|
||||||
|
Nickname *string `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"`
|
||||||
|
AvatarUrl *string `protobuf:"bytes,6,opt,name=avatarUrl" json:"avatarUrl,omitempty"`
|
||||||
|
// 15: avatar url info
|
||||||
|
JoinTime *int64 `protobuf:"varint,16,opt,name=joinTime" json:"joinTime,omitempty"` // uncertainty
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GuildMemberProfile) Reset() {
|
||||||
|
*x = GuildMemberProfile{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_unknown_proto_msgTypes[4]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GuildMemberProfile) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GuildMemberProfile) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GuildMemberProfile) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_unknown_proto_msgTypes[4]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use GuildMemberProfile.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GuildMemberProfile) Descriptor() ([]byte, []int) {
|
||||||
|
return file_unknown_proto_rawDescGZIP(), []int{4}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GuildMemberProfile) GetTinyId() uint64 {
|
||||||
|
if x != nil && x.TinyId != nil {
|
||||||
|
return *x.TinyId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GuildMemberProfile) GetNickname() string {
|
||||||
|
if x != nil && x.Nickname != nil {
|
||||||
|
return *x.Nickname
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GuildMemberProfile) GetAvatarUrl() string {
|
||||||
|
if x != nil && x.AvatarUrl != nil {
|
||||||
|
return *x.AvatarUrl
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GuildMemberProfile) GetJoinTime() int64 {
|
||||||
|
if x != nil && x.JoinTime != nil {
|
||||||
|
return *x.JoinTime
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
var File_unknown_proto protoreflect.FileDescriptor
|
var File_unknown_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_unknown_proto_rawDesc = []byte{
|
var file_unknown_proto_rawDesc = []byte{
|
||||||
@ -236,21 +355,34 @@ var file_unknown_proto_rawDesc = []byte{
|
|||||||
0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x17, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x41,
|
0x17, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x41,
|
||||||
0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49,
|
0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49,
|
||||||
0x6e, 0x66, 0x6f, 0x22, 0x42, 0x0a, 0x0e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x41, 0x64, 0x6d, 0x69,
|
0x6e, 0x66, 0x6f, 0x22, 0x4c, 0x0a, 0x13, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4f, 0x69,
|
||||||
0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x06, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x18,
|
0x64, 0x62, 0x30, 0x78, 0x66, 0x38, 0x38, 0x52, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x07, 0x70, 0x72,
|
||||||
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e,
|
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x68,
|
||||||
0x47, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65,
|
||||||
0x06, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x22, 0x95, 0x01, 0x0a, 0x0f, 0x47, 0x75, 0x69, 0x6c,
|
0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c,
|
||||||
0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74,
|
0x65, 0x22, 0x42, 0x0a, 0x0e, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x49,
|
||||||
0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c,
|
0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x06, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20,
|
||||||
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
|
0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x47, 0x75,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a,
|
0x69, 0x6c, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x61,
|
||||||
0x0d, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04,
|
0x64, 0x6d, 0x69, 0x6e, 0x73, 0x22, 0x95, 0x01, 0x0a, 0x0f, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x4d,
|
||||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x54,
|
0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74,
|
||||||
0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
|
0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12,
|
||||||
0x05, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x6e, 0x79, 0x49,
|
0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||||
0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x74, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x42,
|
0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x6c,
|
||||||
0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x3b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
|
0x61, 0x73, 0x74, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01,
|
||||||
|
0x28, 0x03, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x54, 0x69, 0x6d,
|
||||||
|
0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
|
0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x18,
|
||||||
|
0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x74, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x22, 0x82, 0x01,
|
||||||
|
0x0a, 0x12, 0x47, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x72, 0x6f,
|
||||||
|
0x66, 0x69, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x02,
|
||||||
|
0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x74, 0x69, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08,
|
||||||
|
0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||||
|
0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x76, 0x61, 0x74,
|
||||||
|
0x61, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61,
|
||||||
|
0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6a, 0x6f, 0x69, 0x6e, 0x54, 0x69,
|
||||||
|
0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6a, 0x6f, 0x69, 0x6e, 0x54, 0x69,
|
||||||
|
0x6d, 0x65, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x3b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -265,22 +397,25 @@ func file_unknown_proto_rawDescGZIP() []byte {
|
|||||||
return file_unknown_proto_rawDescData
|
return file_unknown_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_unknown_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
var file_unknown_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||||
var file_unknown_proto_goTypes = []interface{}{
|
var file_unknown_proto_goTypes = []interface{}{
|
||||||
(*ChannelOidb0Xf5BRsp)(nil), // 0: channel.ChannelOidb0xf5bRsp
|
(*ChannelOidb0Xf5BRsp)(nil), // 0: channel.ChannelOidb0xf5bRsp
|
||||||
(*GuildAdminInfo)(nil), // 1: channel.GuildAdminInfo
|
(*ChannelOidb0Xf88Rsp)(nil), // 1: channel.ChannelOidb0xf88Rsp
|
||||||
(*GuildMemberInfo)(nil), // 2: channel.GuildMemberInfo
|
(*GuildAdminInfo)(nil), // 2: channel.GuildAdminInfo
|
||||||
|
(*GuildMemberInfo)(nil), // 3: channel.GuildMemberInfo
|
||||||
|
(*GuildMemberProfile)(nil), // 4: channel.GuildMemberProfile
|
||||||
}
|
}
|
||||||
var file_unknown_proto_depIdxs = []int32{
|
var file_unknown_proto_depIdxs = []int32{
|
||||||
2, // 0: channel.ChannelOidb0xf5bRsp.bots:type_name -> channel.GuildMemberInfo
|
3, // 0: channel.ChannelOidb0xf5bRsp.bots:type_name -> channel.GuildMemberInfo
|
||||||
2, // 1: channel.ChannelOidb0xf5bRsp.members:type_name -> channel.GuildMemberInfo
|
3, // 1: channel.ChannelOidb0xf5bRsp.members:type_name -> channel.GuildMemberInfo
|
||||||
1, // 2: channel.ChannelOidb0xf5bRsp.adminInfo:type_name -> channel.GuildAdminInfo
|
2, // 2: channel.ChannelOidb0xf5bRsp.adminInfo:type_name -> channel.GuildAdminInfo
|
||||||
2, // 3: channel.GuildAdminInfo.admins:type_name -> channel.GuildMemberInfo
|
4, // 3: channel.ChannelOidb0xf88Rsp.profile:type_name -> channel.GuildMemberProfile
|
||||||
4, // [4:4] is the sub-list for method output_type
|
3, // 4: channel.GuildAdminInfo.admins:type_name -> channel.GuildMemberInfo
|
||||||
4, // [4:4] is the sub-list for method input_type
|
5, // [5:5] is the sub-list for method output_type
|
||||||
4, // [4:4] is the sub-list for extension type_name
|
5, // [5:5] is the sub-list for method input_type
|
||||||
4, // [4:4] is the sub-list for extension extendee
|
5, // [5:5] is the sub-list for extension type_name
|
||||||
0, // [0:4] is the sub-list for field type_name
|
5, // [5:5] is the sub-list for extension extendee
|
||||||
|
0, // [0:5] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_unknown_proto_init() }
|
func init() { file_unknown_proto_init() }
|
||||||
@ -302,7 +437,7 @@ func file_unknown_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_unknown_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_unknown_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*GuildAdminInfo); i {
|
switch v := v.(*ChannelOidb0Xf88Rsp); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
@ -314,6 +449,18 @@ func file_unknown_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_unknown_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_unknown_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*GuildAdminInfo); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_unknown_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*GuildMemberInfo); i {
|
switch v := v.(*GuildMemberInfo); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -325,6 +472,18 @@ func file_unknown_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_unknown_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*GuildMemberProfile); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
@ -332,7 +491,7 @@ func file_unknown_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_unknown_proto_rawDesc,
|
RawDescriptor: file_unknown_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 3,
|
NumMessages: 5,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
@ -12,6 +12,10 @@ message ChannelOidb0xf5bRsp {
|
|||||||
optional GuildAdminInfo adminInfo = 25;
|
optional GuildAdminInfo adminInfo = 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message ChannelOidb0xf88Rsp {
|
||||||
|
optional GuildMemberProfile profile = 1;
|
||||||
|
}
|
||||||
|
|
||||||
message GuildAdminInfo {
|
message GuildAdminInfo {
|
||||||
repeated GuildMemberInfo admins = 2;
|
repeated GuildMemberInfo admins = 2;
|
||||||
}
|
}
|
||||||
@ -24,3 +28,23 @@ message GuildMemberInfo {
|
|||||||
optional uint64 tinyId = 8;
|
optional uint64 tinyId = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message GuildMemberProfile {
|
||||||
|
optional uint64 tinyId = 2;
|
||||||
|
optional string nickname = 3;
|
||||||
|
optional string avatarUrl = 6;
|
||||||
|
// 15: avatar url info
|
||||||
|
optional int64 joinTime = 16; // uncertainty
|
||||||
|
// 22 cards
|
||||||
|
// 23 display cards
|
||||||
|
// 25 current cards *uncertainty
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
// 个性档案卡片
|
||||||
|
message GuildMemberProfileCard {
|
||||||
|
optional int32 appid = 1;
|
||||||
|
optional string name = 2;
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user