mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
25 lines
737 B
TypeScript
25 lines
737 B
TypeScript
import BaseAction from '../BaseAction';
|
|
import { ActionName } from '../types';
|
|
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
|
|
|
const SchemaData = {
|
|
type: 'object',
|
|
properties: {
|
|
group_id: { type: ['string', 'number'] },
|
|
},
|
|
required: ['group_id'],
|
|
} as const satisfies JSONSchema;
|
|
|
|
type Payload = FromSchema<typeof SchemaData>;
|
|
|
|
export class SetGroupSign extends BaseAction<Payload, any> {
|
|
actionName = ActionName.SetGroupSign;
|
|
payloadSchema = SchemaData;
|
|
|
|
async _handle(payload: Payload) {
|
|
return await this.core.apis.PacketApi.sendGroupSignPacket(payload.group_id.toString());
|
|
}
|
|
}
|
|
export class SendGroupSign extends SetGroupSign {
|
|
actionName = ActionName.SendGroupSign;
|
|
} |