Build Action / Build-LiteLoader (push) Canceled after 0s
Build Action / Build-Shell (push) Canceled after 0s
Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s
21 lines
775 B
TypeScript
21 lines
775 B
TypeScript
import { ActionName } from '@/onebot/action/router';
|
|
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
|
import { Static, Type } from '@sinclair/typebox';
|
|
|
|
const SchemaData = Type.Object({
|
|
group_id: Type.Union([Type.Number(), Type.String()]),
|
|
folder_id: Type.Optional(Type.String()),
|
|
folder: Type.Optional(Type.String()),
|
|
});
|
|
|
|
type Payload = Static<typeof SchemaData>;
|
|
|
|
export class DeleteGroupFileFolder extends OneBotAction<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 ?? payload.folder_id ?? '')).groupFileCommonResult;
|
|
}
|
|
}
|