build: 1.3.5-beta32

This commit is contained in:
手瓜一十雪 committed 2024-05-18 12:56:03 +08:00
1 parent d6175acd38
commit 44974034ec
15 files changed
+176 -79

No files matched your search

+11 -5
View File
@@ -2,15 +2,21 @@ import { NTQQMsgApi } from '@/core/apis';
import { ActionName } from '../types';
import BaseAction from '../BaseAction';
import { dbUtil } from '@/core/utils/db';
import { napCatCore } from '@/core';
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
interface Payload {
message_id: number
}
const SchemaData = {
type: 'object',
properties: {
message_id: { type: 'number' },
},
required: ['message_id']
} as const satisfies JSONSchema;
type Payload = FromSchema<typeof SchemaData>;
class DeleteMsg extends BaseAction<Payload, void> {
actionName = ActionName.DeleteMsg;
PayloadSchema = SchemaData;
protected async _handle(payload: Payload) {
const msg = await dbUtil.getMsgByShortId(payload.message_id);
if (msg) {