fix: checker

This commit is contained in:
手瓜一十雪
2025-04-15 12:34:33 +08:00
parent 971f292b22
commit 875b20ea9e
56 changed files with 93 additions and 93 deletions

View File

@@ -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>;
@@ -16,7 +16,7 @@ export default class DelEssenceMsg extends OneBotAction<Payload, unknown> {
const msg = MessageUnique.getMsgIdAndPeerByShortId(+payload.message_id);
if (!msg) {
const data = this.core.apis.GroupApi.essenceLRU.getValue(+payload.message_id);
if(!data) throw new Error('消息不存在');
if (!data) throw new Error('消息不存在');
const { msg_seq, msg_random, group_id } = JSON.parse(data) as { msg_seq: string, msg_random: string, group_id: string };
return await this.core.apis.GroupApi.removeGroupEssenceBySeq(group_id, msg_seq, msg_random);
}