File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,17 @@ class GroupNudge(GroupEvent):
5252 attrs_xml : str = field (repr = False )
5353
5454
55+ @dataclass
56+ class GroupSign (GroupEvent ):
57+ """群打卡"""
58+
59+ uin : int
60+ nickname : str
61+ timestamp : int
62+ attrs : Dict [str , Union [str , int ]] = field (repr = False )
63+ attrs_xml : str = field (repr = False )
64+
65+
5566@dataclass
5667class GroupMuteMember (GroupEvent ):
5768 """when target_uid is empty, mute all member"""
Original file line number Diff line number Diff line change 1616)
1717from lagrange .utils .binary .protobuf import proto_decode , ProtoStruct , proto_encode
1818from lagrange .utils .binary .reader import Reader
19- from lagrange .utils .operator import unpack_dict
19+ from lagrange .utils .operator import unpack_dict , timestamp
2020
2121from ..events .group import (
2222 GroupMemberGotSpecialTitle ,
2828 GroupRecall ,
2929 GroupNudge ,
3030 GroupReaction ,
31+ GroupSign ,
3132)
3233from ..wtlogin .sso import SSOPacket
3334from .log import logger
@@ -110,7 +111,14 @@ async def msg_push_handler(client: "Client", sso: SSOPacket):
110111 pb .body .attrs_xml ,
111112 )
112113 elif pb .body .type == 14 : # grp_sign
113- pass
114+ return GroupSign (
115+ grp_id ,
116+ attrs ["mqq_uin" ],
117+ attrs ["mqq_nick" ],
118+ timestamp (),
119+ attrs ,
120+ pb .body .attrs_xml ,
121+ )
114122 else :
115123 raise ValueError (
116124 f"unknown type({ pb .body .type } ) on GroupSub20: { attrs } "
You can’t perform that action at this time.
0 commit comments