mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-23 00:10:19 +08:00
26 lines
799 B
TypeScript
26 lines
799 B
TypeScript
import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
|
import { ActionName } from '@/onebot/action/router';
|
|
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 GetPacketStatusDepends<Payload, any> {
|
|
actionName = ActionName.SetGroupSign;
|
|
payloadSchema = SchemaData;
|
|
|
|
async _handle(payload: Payload) {
|
|
return await this.core.apis.PacketApi.pkt.operation.GroupSign(+payload.group_id);
|
|
}
|
|
}
|
|
export class SendGroupSign extends SetGroupSign {
|
|
actionName = ActionName.SendGroupSign;
|
|
}
|