mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-05 23:19:37 +00:00
20 lines
644 B
TypeScript
20 lines
644 B
TypeScript
import { ActionName } from '@/onebot/action/router';
|
|
import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
|
import { z } from 'zod';
|
|
|
|
const SchemaData = z.object({
|
|
group_id: z.union([z.number(), z.string()]),
|
|
user_id: z.union([z.number(), z.string()]),
|
|
});
|
|
|
|
type Payload = z.infer<typeof SchemaData>;
|
|
|
|
export class GroupPoke extends GetPacketStatusDepends<Payload, void> {
|
|
override actionName = ActionName.GroupPoke;
|
|
override payloadSchema = SchemaData;
|
|
|
|
async _handle(payload: Payload) {
|
|
await this.core.apis.PacketApi.pkt.operation.GroupPoke(+payload.group_id, +payload.user_id);
|
|
}
|
|
}
|