mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 16:20:25 +00:00
all_poke替换成send_poke
This commit is contained in:
19
src/onebot/action/packet/SendPoke.ts
Normal file
19
src/onebot/action/packet/SendPoke.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { GetPacketStatusDepends } from "@/onebot/action/packet/GetPacketStatus";
|
||||
import { Static, Type } from '@sinclair/typebox';
|
||||
|
||||
const SchemaData = Type.Object({
|
||||
group_id: Type.Optional(Type.Union([Type.Number(), Type.String()])),
|
||||
user_id: Type.Union([Type.Number(), Type.String()]),
|
||||
});
|
||||
|
||||
type Payload = Static<typeof SchemaData>;
|
||||
|
||||
export class SendPoke extends GetPacketStatusDepends<Payload, any> {
|
||||
actionName = ActionName.SendPoke;
|
||||
payloadSchema = SchemaData;
|
||||
|
||||
async _handle(payload: Payload) {
|
||||
await this.core.apis.PacketApi.pkt.operation.SendPoke(+payload.user_id, payload.group_id ? +payload.group_id : undefined);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user