mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-02 00:30:25 +00:00
@@ -3,7 +3,7 @@ import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
user_id: z.coerce.string()
|
||||
user_id: z.union([z.coerce.number(), z.coerce.string()])
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -3,8 +3,8 @@ import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
times: z.coerce.number().default(1),
|
||||
user_id: z.coerce.string()
|
||||
times: z.union([z.coerce.number(), z.coerce.string()]).default(1),
|
||||
user_id: z.union([z.coerce.number(), z.coerce.string()])
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -3,9 +3,9 @@ import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
flag: z.coerce.string(),
|
||||
approve: z.coerce.boolean().default(true),
|
||||
remark: z.coerce.string().nullable().optional()
|
||||
flag: z.union([z.coerce.string(), z.coerce.number()]),
|
||||
approve: z.union([z.coerce.string(), z.coerce.boolean()]).default(true),
|
||||
remark: z.union([z.coerce.string(), z.null()]).nullable().optional()
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
Reference in New Issue
Block a user