diff --git a/src/onebot11/constructor.ts b/src/onebot11/constructor.ts index f1e86563..1786073c 100644 --- a/src/onebot11/constructor.ts +++ b/src/onebot11/constructor.ts @@ -303,7 +303,7 @@ export class OB11Constructor { pokedetail = pokedetail.filter(item => item.uid); //console.log("[NapCat] 群拍一拍 群:", pokedetail, parseInt(msg.peerUid), " ", await NTQQUserApi.getUinByUid(pokedetail[0].uid), "拍了拍", await NTQQUserApi.getUinByUid(pokedetail[1].uid)); if (pokedetail.length == 2) { - return new OB11FriendPokeEvent(parseInt((await NTQQUserApi.getUinByUid(pokedetail[1].uid))!), parseInt((await NTQQUserApi.getUinByUid(pokedetail[0].uid))!)); + return new OB11FriendPokeEvent(parseInt((await NTQQUserApi.getUinByUid(pokedetail[0].uid))!), parseInt((await NTQQUserApi.getUinByUid(pokedetail[1].uid))!)); } } //下面得改 上面也是错的grayTipElement.subElementType == GrayTipElementSubType.MEMBER_NEW_TITLE diff --git a/src/onebot11/event/notice/OB11PokeEvent.ts b/src/onebot11/event/notice/OB11PokeEvent.ts index 4df8fafa..2e64cbac 100644 --- a/src/onebot11/event/notice/OB11PokeEvent.ts +++ b/src/onebot11/event/notice/OB11PokeEvent.ts @@ -10,18 +10,17 @@ class OB11PokeEvent extends OB11BaseNoticeEvent { } export class OB11FriendPokeEvent extends OB11PokeEvent { - sender_id: number; - constructor(user_id: number, sender_id: number) { + constructor(user_id: number, target_id: number) { super(); + this.target_id = target_id; this.user_id = user_id; - this.sender_id = sender_id; } } export class OB11GroupPokeEvent extends OB11PokeEvent { group_id: number; - constructor(group_id: number, target_id: number = 0, user_id: number = 0,) { + constructor(group_id: number, user_id: number = 0, target_id: number = 0,) { super(); this.group_id = group_id; this.target_id = target_id;