Files
NapCatQQ/src/onebot/action/user/FriendPoke.ts
T
手瓜一十雪 dd895d7c17
Build Action / Build-LiteLoader (push) Canceled after 0s
Build Action / Build-Shell (push) Canceled after 0s
Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s
fix:coerce
2025-04-15 12:25:37 +08:00

19 lines
592 B
TypeScript

import { ActionName } from '@/onebot/action/router';
import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
import { z } from 'zod';
const SchemaData = z.object({
user_id: z.union([z.coerce.number(), z.coerce.string()])
});
type Payload = z.infer<typeof SchemaData>;
export class FriendPoke extends GetPacketStatusDepends<Payload, void> {
override actionName = ActionName.FriendPoke;
override payloadSchema = SchemaData;
async _handle(payload: Payload) {
await this.core.apis.PacketApi.pkt.operation.FriendPoke(+payload.user_id);
}
}