mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-26 02:12:50 +08:00
26 lines
776 B
TypeScript
26 lines
776 B
TypeScript
import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
|
import { ActionName } from '@/onebot/action/router';
|
|
import { z } from 'zod';
|
|
import { coerce } from '@/common/coerce';
|
|
const SchemaData = z.object({
|
|
group_id: coerce.string(),
|
|
});
|
|
|
|
type Payload = z.infer<typeof SchemaData>;
|
|
|
|
class SetGroupSignBase extends GetPacketStatusDepends<Payload, void> {
|
|
override payloadSchema = SchemaData;
|
|
|
|
async _handle(payload: Payload) {
|
|
return await this.core.apis.PacketApi.pkt.operation.GroupSign(+payload.group_id);
|
|
}
|
|
}
|
|
|
|
export class SetGroupSign extends SetGroupSignBase {
|
|
override actionName = ActionName.SetGroupSign;
|
|
}
|
|
|
|
export class SendGroupSign extends SetGroupSignBase {
|
|
override actionName = ActionName.SendGroupSign;
|
|
}
|