diff --git a/packages/napcat-core/apis/online.ts b/packages/napcat-core/apis/online.ts index 967ff737..4a89c61b 100644 --- a/packages/napcat-core/apis/online.ts +++ b/packages/napcat-core/apis/online.ts @@ -114,8 +114,9 @@ export class NTQQOnlineApi { fileElement: { fileName: actualFolderName, filePath: folderPath, + fileSize: "", }, - } as any; + }; const msgService = this.context.session.getMsgService(); const startTime = Math.floor(Date.now() / 1000) - 2; @@ -173,7 +174,7 @@ export class NTQQOnlineApi { * 获取好友的在线文件消息 * @param peer */ - async getOnlineFileMsg (peer: Peer) : Promise { + async getOnlineFileMsg (peer: Peer): Promise { const msgService = this.context.session.getMsgService(); return await msgService.getOnlineFileMsgs(peer); } @@ -183,7 +184,7 @@ export class NTQQOnlineApi { * @param peer * @param msgId */ - async cancelMyOnlineFileMsg (peer: Peer, msgId: string) : Promise { + async cancelMyOnlineFileMsg (peer: Peer, msgId: string): Promise { const msgService = this.context.session.getMsgService(); await msgService.cancelSendMsg(peer, msgId); } @@ -194,7 +195,7 @@ export class NTQQOnlineApi { * @param msgId * @param elementId */ - async refuseOnlineFileMsg (peer: Peer, msgId: string, elementId: string) : Promise { + async refuseOnlineFileMsg (peer: Peer, msgId: string, elementId: string): Promise { const msgService = this.context.session.getMsgService(); const arrToSend = { msgId, @@ -215,7 +216,7 @@ export class NTQQOnlineApi { * @param elementId * @constructor */ - async receiveOnlineFileOrFolder (peer: Peer, msgId: string, elementId: string) : Promise { + async receiveOnlineFileOrFolder (peer: Peer, msgId: string, elementId: string): Promise { const msgService = this.context.session.getMsgService(); const arrToSend = { msgId, @@ -233,7 +234,7 @@ export class NTQQOnlineApi { * @param peer * @param msgId */ - async switchFileToOffline (peer: Peer, msgId: string) : Promise { + async switchFileToOffline (peer: Peer, msgId: string): Promise { const msgService = this.context.session.getMsgService(); await msgService.switchToOfflineSendMsg(peer, msgId); } diff --git a/packages/napcat-onebot/action/extends/ClickInlineKeyboardButton.ts b/packages/napcat-onebot/action/extends/ClickInlineKeyboardButton.ts index 465f04b2..7da559c9 100644 --- a/packages/napcat-onebot/action/extends/ClickInlineKeyboardButton.ts +++ b/packages/napcat-onebot/action/extends/ClickInlineKeyboardButton.ts @@ -19,7 +19,8 @@ type ReturnType = Static; export class ClickInlineKeyboardButton extends OneBotAction { override actionName = ActionName.ClickInlineKeyboardButton; override payloadSchema = PayloadSchema; - override returnSchema = ReturnSchema; override actionSummary = '点击内联键盘按钮'; + override returnSchema = ReturnSchema; + override actionSummary = '点击内联键盘按钮'; override actionTags = ['消息扩展']; override payloadExample = { group_id: '123456', @@ -29,7 +30,7 @@ export class ClickInlineKeyboardButton extends OneBotAction = { - openapi: '3.0.1', + openapi: '3.1.0', info: { title: 'NapCat OneBot 11 HTTP API', description: 'NapCatOneBot11 HTTP POST 接口文档', - version: '1.0.0' + version: napCatVersion }, tags: [ { name: '消息接口', description: '发送、删除、获取消息相关接口' }, diff --git a/packages/napcat-schema/package.json b/packages/napcat-schema/package.json index 27e62dad..72098baa 100644 --- a/packages/napcat-schema/package.json +++ b/packages/napcat-schema/package.json @@ -9,7 +9,8 @@ }, "dependencies": { "@sinclair/typebox": "^0.34.38", - "napcat-onebot": "workspace:*" + "napcat-onebot": "workspace:*", + "napcat-common": "workspace:*" }, "devDependencies": { "tsx": "^4.7.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5dc9e4d0..ae94931c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -261,6 +261,9 @@ importers: '@sinclair/typebox': specifier: ^0.34.38 version: 0.34.41 + napcat-common: + specifier: workspace:* + version: link:../napcat-common napcat-onebot: specifier: workspace:* version: link:../napcat-onebot