mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
add FriendAddEvent
This commit is contained in:
parent
84894a73e1
commit
32213be7a7
@ -446,6 +446,16 @@ export class OB11Constructor {
|
||||
}
|
||||
}
|
||||
|
||||
static async FriendAddEvent(msg: RawMessage): Promise<OB11FriendAddNoticeEvent | undefined> {
|
||||
if (msg.chatType !== ChatType.friend) {
|
||||
return;
|
||||
}
|
||||
if (msg.peerUin&&msg.peerUid) {
|
||||
const event = new OB11FriendAddNoticeEvent(parseInt(msg.peerUin));
|
||||
return event;
|
||||
}
|
||||
}
|
||||
|
||||
static friend(friend: User): OB11User {
|
||||
return {
|
||||
user_id: parseInt(friend.uin),
|
||||
|
Loading…
x
Reference in New Issue
Block a user