Revert "fix: checker"

This reverts commit 941978b578.
This commit is contained in:
手瓜一十雪
2025-04-19 10:58:46 +08:00
parent 80a34c82b9
commit 2a4589e268
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.coerce.string(),
message_id: z.union([z.coerce.number(), 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);
}