mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
feat: support folder_id
This commit is contained in:
parent
c6342b80a7
commit
7f9da8cc2d
@ -6,8 +6,9 @@ const SchemaData = {
|
|||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
group_id: { type: ['string', 'number'] },
|
group_id: { type: ['string', 'number'] },
|
||||||
start_index: { type: 'number' },
|
start_index: { type: ['string', 'number'] },
|
||||||
file_count: { type: 'number' },
|
file_count: { type: ['string', 'number'] },
|
||||||
|
folder_id: { type: ['string', 'number'] },
|
||||||
},
|
},
|
||||||
required: ['group_id', 'start_index', 'file_count'],
|
required: ['group_id', 'start_index', 'file_count'],
|
||||||
} as const satisfies JSONSchema;
|
} as const satisfies JSONSchema;
|
||||||
@ -20,12 +21,19 @@ export class GetGroupFileList extends BaseAction<Payload, { FileList: Array<any>
|
|||||||
|
|
||||||
async _handle(payload: Payload) {
|
async _handle(payload: Payload) {
|
||||||
const NTQQMsgApi = this.core.apis.MsgApi;
|
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(), {
|
const ret = await NTQQMsgApi.getGroupFileList(payload.group_id.toString(), {
|
||||||
sortType: 1,
|
sortType: 1,
|
||||||
fileCount: payload.file_count,
|
fileCount: +payload.file_count,
|
||||||
startIndex: payload.start_index,
|
startIndex: +payload.start_index,
|
||||||
sortOrder: 2,
|
sortOrder: 2,
|
||||||
showOnlinedocFolder: 0,
|
showOnlinedocFolder: 0,
|
||||||
|
...param
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
return [];
|
return [];
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user