Skip to content

Commit

Permalink
chore: 兼容性提高
Browse files Browse the repository at this point in the history
  • Loading branch information
MliKiowa committed Aug 14, 2024
1 parent 5770fc0 commit daa2c39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/onebot/action/go-cqhttp/DownloadFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down
4 changes: 2 additions & 2 deletions src/onebot/action/msg/ForwardSingleMsg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'] },
},
Expand All @@ -31,7 +31,7 @@ class ForwardSingleMsg extends BaseAction<Payload, null> {

async _handle(payload: Payload): Promise<null> {
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}`);
}
Expand Down

0 comments on commit daa2c39

Please sign in to comment.