mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-11 15:30:25 +00:00
24 lines
776 B
TypeScript
24 lines
776 B
TypeScript
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
|
import { ActionName } from '../types';
|
|
import BaseAction from '../BaseAction';
|
|
|
|
const SchemaData = {
|
|
type: 'object',
|
|
properties: {
|
|
group_id: { type: ['string', 'number'] },
|
|
folder_id: { type: 'string' },
|
|
},
|
|
required: ['group_id', 'folder_id'],
|
|
} as const satisfies JSONSchema;
|
|
|
|
type Payload = FromSchema<typeof SchemaData>;
|
|
|
|
export class DeleteGroupFileFolder extends BaseAction<Payload, any> {
|
|
actionName = ActionName.GoCQHTTP_DeleteGroupFileFolder;
|
|
payloadSchema = SchemaData;
|
|
async _handle(payload: Payload) {
|
|
return (await this.core.apis.GroupApi.DelGroupFileFolder(
|
|
payload.group_id.toString(), payload.folder_id)).groupFileCommonResult;
|
|
}
|
|
}
|