Example #1
0
 def __init__(self, ctx: FriendMsg):
     file_data: Dict = json.loads(ctx.Content)
     super()._carry_properties(ctx)
     self.FileID: str = file_data.get('FileID', '')
     self.FileName: str = file_data.get('FileName', '')
     self.FileSize: int = file_data.get('FileSize', -1)
     self.Tips: str = file_data.get('Tips', '')
Example #2
0
 def __init__(self, ctx: FriendMsg):
     reply_data: Dict = json.loads(ctx.Content)
     super()._carry_properties(ctx)
     self.Content: str = reply_data.get('Content', '')
     self.OriginMsgSeq: int = reply_data.get('MsgSeq', -1)
     self.SrcContent: str = reply_data.get('SrcContent', '')
     self.Tips: str = reply_data.get('Tips', '')
     self.AtUserID: List = reply_data.get('UserID', [])
Example #3
0
 def __init__(self, ctx: FriendMsg):
     pic_data = json.loads(ctx.Content)
     self.FriendPic: List[_FriendPic] = [
         _FriendPic(i) for i in pic_data['FriendPic']
     ]
     self.Tips: str = pic_data['Tips']
     super()._carry_properties(ctx)
     self.Content = pic_data.get('Content') or ''
Example #4
0
 def __init__(self, ctx: GroupMsg):
     pic_data = json.loads(ctx.Content)
     self.GroupPic: List[_GroupPic] = [
         _GroupPic(i) for i in pic_data['GroupPic']
     ]
     self.Tips: str = pic_data['Tips']
     super()._carry_properties(ctx)
     self.Content: str = pic_data.get('Content')
Example #5
0
 def __init__(self, ctx: FriendMsg):
     video_data = json.loads(ctx.Content)
     self.ForwordBuf: str = video_data['ForwordBuf']
     self.ForwordField: int = video_data['ForwordField']
     self.Tips: str = video_data['Tips']
     self.VideoMd5: str = video_data['VideoMd5']
     self.VideoSize: str = video_data['VideoSize']
     self.VideoUrl: str = video_data['VideoUrl']
     super()._carry_properties(ctx)
Example #6
0
 def __init__(self, ctx: GroupMsg):
     judge = {'[群图片]':'GroupPic',
              '[好友图片]':'FriendPic'}
     pic_data = json.loads(ctx.Content)
     self.Tips: str = pic_data['Tips']
     if self.Tips != '[群消息-QQ闪照]':
         self.GroupPic: List[_GroupPic] = [_GroupPic(i) for i in pic_data[judge[self.Tips]]]
     else:
         self.GroupPic: List[_GroupPic] = [_GroupPic(pic_data)]
     super()._carry_properties(ctx)
     self.Content: str = pic_data.get('Content')
Example #7
0
 def __init__(self, ctx: FriendMsg):
     voice_data = json.loads(ctx.Content)
     self.VoiceUrl: str = voice_data['Url']
     self.Tips: str = voice_data['Tips']
     super()._carry_properties(ctx)