mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 16:20:25 +00:00
fix: checker
This commit is contained in:
@@ -4,7 +4,7 @@ import { MessageUnique } from '@/common/message-unique';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
message_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
message_id: z.coerce.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { MessageUnique } from '@/common/message-unique';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
message_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
message_id: z.coerce.string(),
|
||||
group_id: z.coerce.string().optional(),
|
||||
user_id: z.coerce.string().optional(),
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@ import { NetworkAdapterConfig } from '@/onebot/config/config';
|
||||
export type ReturnDataType = OB11Message
|
||||
|
||||
const SchemaData = z.object({
|
||||
message_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
message_id: z.coerce.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
@@ -29,7 +29,7 @@ class GetMsg extends OneBotAction<Payload, OB11Message> {
|
||||
}
|
||||
const peer = { guildId: '', peerUid: msgIdWithPeer?.Peer.peerUid, chatType: msgIdWithPeer.Peer.chatType };
|
||||
const orimsg = this.obContext.recallMsgCache.get(msgIdWithPeer.MsgId);
|
||||
let msg: RawMessage|undefined;
|
||||
let msg: RawMessage | undefined;
|
||||
if (orimsg) {
|
||||
msg = orimsg;
|
||||
} else {
|
||||
|
||||
@@ -5,9 +5,9 @@ import { MessageUnique } from '@/common/message-unique';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
user_id: z.union([z.coerce.string(), z.coerce.number()]).optional(),
|
||||
group_id: z.union([z.coerce.string(), z.coerce.number()]).optional(),
|
||||
message_id: z.union([z.coerce.string(), z.coerce.number()]).optional(),
|
||||
user_id: z.coerce.string().optional(),
|
||||
group_id: z.coerce.string().optional(),
|
||||
message_id: z.coerce.string().optional(),
|
||||
});
|
||||
|
||||
type PlayloadType = z.infer<typeof SchemaData>;
|
||||
|
||||
@@ -4,8 +4,8 @@ import { MessageUnique } from '@/common/message-unique';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
message_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
emoji_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
message_id: z.coerce.string(),
|
||||
emoji_id: z.coerce.string(),
|
||||
set: z.coerce.boolean().optional(),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user