From daa2c39902e38c91fac21e7ab7e3efdcacf8c0f5 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: Thu, 15 Aug 2024 00:00:21 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=85=BC=E5=AE=B9=E6=80=A7=E6=8F=90?= =?UTF-8?q?=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/onebot/action/go-cqhttp/DownloadFile.ts | 2 +- src/onebot/action/msg/ForwardSingleMsg.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/onebot/action/go-cqhttp/DownloadFile.ts b/src/onebot/action/go-cqhttp/DownloadFile.ts index 044182e6..74209209 100644 --- a/src/onebot/action/go-cqhttp/DownloadFile.ts +++ b/src/onebot/action/go-cqhttp/DownloadFile.ts @@ -13,7 +13,7 @@ interface FileResponse { const SchemaData = { type: 'object', properties: { - thread_count: { type: 'number' }, + thread_count: { type: ['number', 'string'] }, url: { type: 'string' }, base64: { type: 'string' }, name: { type: 'string' }, diff --git a/src/onebot/action/msg/ForwardSingleMsg.ts b/src/onebot/action/msg/ForwardSingleMsg.ts index 06ffb9e9..fb8ac5a7 100644 --- a/src/onebot/action/msg/ForwardSingleMsg.ts +++ b/src/onebot/action/msg/ForwardSingleMsg.ts @@ -7,7 +7,7 @@ import { MessageUnique } from '@/common/utils/MessageUnique'; const SchemaData = { type: 'object', properties: { - message_id: { type: 'number' }, + message_id: { type: ['number', 'string'] }, group_id: { type: ['number', 'string'] }, user_id: { type: ['number', 'string'] }, }, @@ -31,7 +31,7 @@ class ForwardSingleMsg extends BaseAction { async _handle(payload: Payload): Promise { const NTQQMsgApi = this.CoreContext.apis.MsgApi; - const msg = MessageUnique.getMsgIdAndPeerByShortId(payload.message_id); + const msg = MessageUnique.getMsgIdAndPeerByShortId(parseInt(payload.message_id.toString())); if (!msg) { throw new Error(`无法找到消息${payload.message_id}`); }