Exemple #1
0
 def __init__(self, data, is_base64=True):
     data = base64.decodebytes(data.encode()) if is_base64 else data
     info = CQUnpack(data)
     self.QQID = info.get_long()
     self.Nickname = info.get_length_str().decode('gb18030')
     self.Sex = info.get_int()
     self.Age = info.get_int()
Exemple #2
0
 def __init__(self, data, is_base64=True):
     data = base64.decodebytes(data.encode()) if is_base64 else data
     info = CQUnpack(data)
     self.GroupID = info.get_long()
     self.QQID = info.get_long()
     self.Nickname = info.get_length_str().decode('gb18030')
     self.Card = info.get_length_str().decode('gb18030')
     self.Sex = info.get_int()
     self.Age = info.get_int()
     self.Address = info.get_length_str().decode('gb18030')
     self.JoinGroupTime = info.get_int()
     self.LastSpeakTime = info.get_int()
     self.LevelName = info.get_length_str().decode('gb18030')
     self.Authority = info.get_int()
     self.IsGroupAdmin = self.Authority in [2, 3]
     self.IsGroupOwner = self.Authority in [3]
     self.IsBad = (info.get_int() == 1)
     self.SpecialTitle = info.get_length_str().decode('gb18030')
     self.SpecialTitleExpiredTime = info.get_int()
     self.IsAllowedToModifyCard = (info.get_int() == 1)
Exemple #3
0
 def __init__(self, data: bytes, is_base64=True):
     data = base64.decodebytes(data) if is_base64 else data
     info = CQUnpack(data)
     self.Identifier = info.get_long()
     self.AnonymousName = info.get_length_str().decode('gb18030')
     self.Token = info.get_length_str()