diff --git a/src/core/packet/context/operationContext.ts b/src/core/packet/context/operationContext.ts index 4b32e158..3cf21980 100644 --- a/src/core/packet/context/operationContext.ts +++ b/src/core/packet/context/operationContext.ts @@ -148,8 +148,4 @@ export class PacketOperationContext { return res.msgInfo; } } - - async SendPoke(uin: number, groupUin?: number) { - await (groupUin ? this.GroupPoke(uin,groupUin) : this.FriendPoke(uin)); - } } diff --git a/src/onebot/action/packet/SendPoke.ts b/src/onebot/action/packet/SendPoke.ts index ed403adb..13819a66 100644 --- a/src/onebot/action/packet/SendPoke.ts +++ b/src/onebot/action/packet/SendPoke.ts @@ -14,6 +14,10 @@ export class SendPoke extends GetPacketStatusDepends { payloadSchema = SchemaData; async _handle(payload: Payload) { - await this.core.apis.PacketApi.pkt.operation.SendPoke(+payload.user_id, payload.group_id ? +payload.group_id : undefined); + if (payload.group_id) { + this.core.apis.PacketApi.pkt.operation.GroupPoke(+payload.group_id, +payload.user_id); + } else { + this.core.apis.PacketApi.pkt.operation.FriendPoke(+payload.user_id); + } } } \ No newline at end of file