mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 16:20:25 +00:00
@@ -2,9 +2,9 @@ import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { MessageUnique } from '@/common/message-unique';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
message_id: actionType.string(),
|
||||
message_id: z.coerce.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
notice_id: actionType.string()
|
||||
group_id: z.coerce.string(),
|
||||
notice_id: z.coerce.string()
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -2,11 +2,11 @@ import { ActionName } from '@/onebot/action/router';
|
||||
import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
||||
import { AIVoiceChatType } from '@/core/packet/entities/aiChat';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
character: actionType.string(),
|
||||
group_id: actionType.string(),
|
||||
text: actionType.string(),
|
||||
character: z.coerce.string(),
|
||||
group_id: z.coerce.string(),
|
||||
text: z.coerce.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -5,9 +5,9 @@ import { MessageUnique } from '@/common/message-unique';
|
||||
import crypto from 'crypto';
|
||||
import { z } from 'zod';
|
||||
import { NetworkAdapterConfig } from '@/onebot/config/config';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
group_id: z.coerce.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -3,9 +3,9 @@ import { OB11Construct } from '@/onebot/helper/data';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
group_id: z.coerce.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -3,10 +3,9 @@ import { OB11Construct } from '@/onebot/helper/data';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
no_cache: actionType.boolean().default(false),
|
||||
no_cache: z.coerce.boolean().default(false),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -3,12 +3,11 @@ import { OB11Construct } from '@/onebot/helper/data';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
user_id: actionType.string(),
|
||||
no_cache: actionType.boolean().default(false),
|
||||
group_id: z.coerce.string(),
|
||||
user_id: z.coerce.string(),
|
||||
no_cache: z.coerce.boolean().default(false),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -4,11 +4,10 @@ import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { GroupMember } from '@/core';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
no_cache: actionType.boolean().default(false)
|
||||
group_id: z.coerce.string(),
|
||||
no_cache: z.coerce.boolean().default(false)
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -2,7 +2,6 @@ import { WebApiGroupNoticeFeed } from '@/core';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
interface GroupNotice {
|
||||
sender_id: number;
|
||||
publish_time: number;
|
||||
@@ -18,7 +17,7 @@ interface GroupNotice {
|
||||
}
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
group_id: z.coerce.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -2,9 +2,9 @@ import { ShutUpGroupMember } from '@/core';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
group_id: z.coerce.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
user_id: actionType.string(),
|
||||
group_id: z.coerce.string(),
|
||||
user_id: z.coerce.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -2,11 +2,11 @@ import { ActionName } from '@/onebot/action/router';
|
||||
import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
||||
import { AIVoiceChatType } from '@/core/packet/entities/aiChat';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
character: actionType.string(),
|
||||
group_id: actionType.string(),
|
||||
text: actionType.string(),
|
||||
character: z.coerce.string(),
|
||||
group_id: z.coerce.string(),
|
||||
text: z.coerce.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -2,9 +2,9 @@ import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { MessageUnique } from '@/common/message-unique';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
message_id: actionType.string(),
|
||||
message_id: z.coerce.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -2,12 +2,11 @@ import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { NTGroupRequestOperateTypes } from '@/core/types';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
flag: actionType.string(),
|
||||
approve: actionType.boolean().default(true),
|
||||
reason: actionType.string().nullable().default(' '),
|
||||
flag: z.coerce.string(),
|
||||
approve: z.coerce.boolean().default(true),
|
||||
reason: z.coerce.string().nullable().default(' '),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -2,12 +2,11 @@ import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { NTGroupMemberRole } from '@/core/types';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
user_id: actionType.string(),
|
||||
enable: actionType.boolean().default(false),
|
||||
group_id: z.coerce.string(),
|
||||
user_id: z.coerce.string(),
|
||||
enable: z.coerce.boolean().default(false),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
user_id: actionType.string(),
|
||||
duration: actionType.number().default(0),
|
||||
group_id: z.coerce.string(),
|
||||
user_id: z.coerce.string(),
|
||||
duration: z.coerce.number().default(0),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
user_id: actionType.string(),
|
||||
card: actionType.string().optional(),
|
||||
group_id: z.coerce.string(),
|
||||
user_id: z.coerce.string(),
|
||||
card: z.coerce.string().optional(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
user_id: actionType.string(),
|
||||
reject_add_request: actionType.boolean().optional(),
|
||||
group_id: z.coerce.string(),
|
||||
user_id: z.coerce.string(),
|
||||
reject_add_request: z.coerce.boolean().optional(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
is_dismiss: actionType.boolean().optional(),
|
||||
group_id: z.coerce.string(),
|
||||
is_dismiss: z.coerce.boolean().optional(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
group_name: actionType.string(),
|
||||
group_id: z.coerce.string(),
|
||||
group_name: z.coerce.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: actionType.string(),
|
||||
enable: actionType.boolean().optional(),
|
||||
group_id: z.coerce.string(),
|
||||
enable: z.coerce.boolean().optional(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
Reference in New Issue
Block a user