mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-12 07:50:25 +00:00
@@ -4,7 +4,7 @@ import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: z.coerce.string(),
|
||||
group_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
file_id: z.coerce.string(),
|
||||
current_parent_directory: z.coerce.string(),
|
||||
target_parent_directory: z.coerce.string(),
|
||||
|
||||
@@ -4,7 +4,7 @@ import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: z.coerce.string(),
|
||||
group_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
file_id: z.coerce.string(),
|
||||
current_parent_directory: z.coerce.string(),
|
||||
new_name: z.coerce.string(),
|
||||
|
||||
@@ -3,8 +3,8 @@ import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
face_id: z.coerce.string(),// 参考 face_config.json 的 QSid
|
||||
face_type: z.coerce.string().default('1'),
|
||||
face_id: z.union([z.coerce.number(), z.coerce.string()]),// 参考 face_config.json 的 QSid
|
||||
face_type: z.union([z.coerce.number(), z.coerce.string()]).default('1'),
|
||||
wording: z.coerce.string().default(' '),
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: z.coerce.string(),
|
||||
group_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ChatType } from '@/core';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
user_id: z.coerce.string(),
|
||||
user_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
event_type: z.coerce.number(),
|
||||
});
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
status: z.coerce.number(),
|
||||
ext_status: z.coerce.number(),
|
||||
battery_status: z.coerce.number(),
|
||||
status: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
ext_status: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
battery_status: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -3,8 +3,8 @@ import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: z.coerce.string(),
|
||||
user_id: z.coerce.string(),
|
||||
group_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
user_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
special_title: z.coerce.string().default(''),
|
||||
});
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
user_id: z.coerce.string().optional(),
|
||||
group_id: z.coerce.string().optional(),
|
||||
user_id: z.union([z.coerce.number(), z.coerce.string()]).optional(),
|
||||
group_id: z.union([z.coerce.number(), z.coerce.string()]).optional(),
|
||||
phoneNumber: z.coerce.string().default(''),
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ export class SharePeer extends OneBotAction<Payload, GeneralCallResult & {
|
||||
}
|
||||
|
||||
const SchemaDataGroupEx = z.object({
|
||||
group_id: z.coerce.string(),
|
||||
group_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
});
|
||||
|
||||
type PayloadGroupEx = z.infer<typeof SchemaDataGroupEx>;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: z.coerce.string(),
|
||||
group_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
file_id: z.coerce.string(),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user