chore: 落地标准化

This commit is contained in:
手瓜一十雪
2024-07-29 08:43:37 +08:00
parent e169199107
commit add46b3251
2 changed files with 26 additions and 3 deletions

View File

@@ -399,7 +399,29 @@ export interface NodeIKernelMsgService {
// true, // true,
// true // true
// ] // ]
fetchFavEmojiList(str: string, num: number, uk1: boolean, uk2: boolean): Promise<unknown>; fetchFavEmojiList(str: string, num: number, uk1: boolean, uk2: boolean): Promise<GeneralCallResult & {
emojiInfoList: Array<{
uin: string,
emoId: number,
emoPath: string,
isExist: boolean,
resId: string,
url: string,
md5: string,
emoOriginalPath: string,
thumbPath: string,
RomaingType: string,
isAPNG: false,
isMarkFace: false,
eId: string,
epId: string,
ocrWord: string,
modifyWord: string,
exposeNum: number,
clickNum: number,
desc: string
}>
}>;
addFavEmoji(...args: unknown[]): unknown; addFavEmoji(...args: unknown[]): unknown;

View File

@@ -11,10 +11,11 @@ const SchemaData = {
type Payload = FromSchema<typeof SchemaData>; type Payload = FromSchema<typeof SchemaData>;
export class FetchCustomFace extends BaseAction<Payload, any> { export class FetchCustomFace extends BaseAction<Payload, string[]> {
actionName = ActionName.FetchCustomFace; actionName = ActionName.FetchCustomFace;
PayloadSchema = SchemaData; PayloadSchema = SchemaData;
protected async _handle(payload: Payload) { protected async _handle(payload: Payload) {
return await NTQQMsgApi.fetchFavEmojiList(payload.count || 48); let ret = await NTQQMsgApi.fetchFavEmojiList(payload.count || 48);
return ret.emojiInfoList.map(e => e.url);
} }
} }