mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 07:29:38 +00:00
26 lines
761 B
TypeScript
26 lines
761 B
TypeScript
import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
|
import { ActionName } from '@/onebot/action/router';
|
|
import { Static, Type } from '@sinclair/typebox';
|
|
|
|
const SchemaData = Type.Object({
|
|
group_id: Type.Union([Type.Number(), Type.String()]),
|
|
});
|
|
|
|
type Payload = Static<typeof SchemaData>;
|
|
|
|
class SetGroupSignBase extends GetPacketStatusDepends<Payload, any> {
|
|
payloadSchema = SchemaData;
|
|
|
|
async _handle(payload: Payload) {
|
|
return await this.core.apis.PacketApi.pkt.operation.GroupSign(+payload.group_id);
|
|
}
|
|
}
|
|
|
|
export class SetGroupSign extends SetGroupSignBase {
|
|
actionName = ActionName.SetGroupSign;
|
|
}
|
|
|
|
export class SendGroupSign extends SetGroupSignBase {
|
|
actionName = ActionName.SendGroupSign;
|
|
}
|