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}`); }