From add46b3251e141ada26d5378332459f2dbffff77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Mon, 29 Jul 2024 08:43:37 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=90=BD=E5=9C=B0=E6=A0=87=E5=87=86?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/services/NodeIKernelMsgService.ts | 24 ++++++++++++++++++- .../action/extends/FetchCustomFace.ts | 5 ++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/core/src/services/NodeIKernelMsgService.ts b/src/core/src/services/NodeIKernelMsgService.ts index 5984de50..3327dc5b 100644 --- a/src/core/src/services/NodeIKernelMsgService.ts +++ b/src/core/src/services/NodeIKernelMsgService.ts @@ -399,7 +399,29 @@ export interface NodeIKernelMsgService { // true, // true // ] - fetchFavEmojiList(str: string, num: number, uk1: boolean, uk2: boolean): Promise; + fetchFavEmojiList(str: string, num: number, uk1: boolean, uk2: boolean): Promise + }>; addFavEmoji(...args: unknown[]): unknown; diff --git a/src/onebot11/action/extends/FetchCustomFace.ts b/src/onebot11/action/extends/FetchCustomFace.ts index 817b5758..5edf95e5 100644 --- a/src/onebot11/action/extends/FetchCustomFace.ts +++ b/src/onebot11/action/extends/FetchCustomFace.ts @@ -11,10 +11,11 @@ const SchemaData = { type Payload = FromSchema; -export class FetchCustomFace extends BaseAction { +export class FetchCustomFace extends BaseAction { actionName = ActionName.FetchCustomFace; PayloadSchema = SchemaData; 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); } }