mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 00:00:26 +00:00
Introduces new OneBot actions for group album media: listing, commenting, liking, and deleting. Adds supporting API methods and data structures for album media operations in NTQQWebApi and NodeIKernelAlbumService. Updates action router and index to register new actions.
27 lines
777 B
TypeScript
27 lines
777 B
TypeScript
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
|
import { ActionName } from '@/onebot/action/router';
|
|
import { Static, Type } from '@sinclair/typebox';
|
|
|
|
const SchemaData = Type.Object({
|
|
group_id: Type.String(),
|
|
album_id: Type.String(),
|
|
lloc: Type.String(),
|
|
content: Type.String(),
|
|
});
|
|
|
|
type Payload = Static<typeof SchemaData>;
|
|
|
|
export class DoGroupAlbumComment extends OneBotAction<Payload, unknown> {
|
|
override actionName = ActionName.DoGroupAlbumComment;
|
|
override payloadSchema = SchemaData;
|
|
|
|
async _handle(payload: Payload) {
|
|
return await this.core.apis.WebApi.doAlbumMediaPlainCommentByNTQQ(
|
|
payload.group_id,
|
|
payload.album_id,
|
|
payload.lloc,
|
|
payload.content
|
|
);
|
|
}
|
|
}
|