diff --git a/src/onebot/action/file/GetGroupFileList.ts b/src/onebot/action/file/GetGroupFileList.ts index dbb7ff4f..40c12648 100644 --- a/src/onebot/action/file/GetGroupFileList.ts +++ b/src/onebot/action/file/GetGroupFileList.ts @@ -6,8 +6,9 @@ const SchemaData = { type: 'object', properties: { group_id: { type: ['string', 'number'] }, - start_index: { type: 'number' }, - file_count: { type: 'number' }, + start_index: { type: ['string', 'number'] }, + file_count: { type: ['string', 'number'] }, + folder_id: { type: ['string', 'number'] }, }, required: ['group_id', 'start_index', 'file_count'], } as const satisfies JSONSchema; @@ -20,12 +21,19 @@ export class GetGroupFileList extends BaseAction async _handle(payload: Payload) { const NTQQMsgApi = this.core.apis.MsgApi; + let param = {}; + if (payload.folder_id) { + param = { + folderId: payload.folder_id.toString(), + }; + } const ret = await NTQQMsgApi.getGroupFileList(payload.group_id.toString(), { sortType: 1, - fileCount: payload.file_count, - startIndex: payload.start_index, + fileCount: +payload.file_count, + startIndex: +payload.start_index, sortOrder: 2, showOnlinedocFolder: 0, + ...param }).catch((e) => { return []; });