mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
chore: run a full eslint
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { ActionName } from '../types';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { NTQQMsgApi } from '@/core/apis';
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
import { MessageUnique } from '@/common/utils/MessageUnique';
|
||||
|
||||
@@ -8,9 +7,9 @@ const SchemaData = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
message_id: { type: ['string', 'number'] },
|
||||
emoji_id: { type: ['string', 'number'] }
|
||||
emoji_id: { type: ['string', 'number'] },
|
||||
},
|
||||
required: ['message_id', 'emoji_id']
|
||||
required: ['message_id', 'emoji_id'],
|
||||
} as const satisfies JSONSchema;
|
||||
|
||||
type Payload = FromSchema<typeof SchemaData>;
|
||||
@@ -18,6 +17,7 @@ type Payload = FromSchema<typeof SchemaData>;
|
||||
export class SetMsgEmojiLike extends BaseAction<Payload, any> {
|
||||
actionName = ActionName.SetMsgEmojiLike;
|
||||
PayloadSchema = SchemaData;
|
||||
|
||||
protected async _handle(payload: Payload) {
|
||||
const NTQQMsgApi = this.CoreContext.getApiContext().MsgApi;
|
||||
const msg = MessageUnique.getMsgIdAndPeerByShortId(parseInt(payload.message_id.toString()));
|
||||
|
||||
Reference in New Issue
Block a user