all_poke替换成send_poke
This commit is contained in:
1 parent
a9e471deca
commit
fb405a5c1c
4 files changed
+7
-7
No files matched your search
@@ -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