all_poke替换成send_poke

This commit is contained in:
Shua-github
2024-12-27 13:15:10 +08:00
parent a9e471deca
commit fb405a5c1c
4 changed files with 7 additions and 7 deletions

View File

@@ -149,7 +149,7 @@ export class PacketOperationContext {
} }
} }
async AllPoke(uin: number, groupUin?: number) { async SendPoke(uin: number, groupUin?: number) {
await (groupUin ? this.GroupPoke(uin,groupUin) : this.FriendPoke(uin)); await (groupUin ? this.GroupPoke(uin,groupUin) : this.FriendPoke(uin));
} }
} }

View File

@@ -104,7 +104,7 @@ import { GetGuildList } from './guild/GetGuildList';
import { GetGuildProfile } from './guild/GetGuildProfile'; import { GetGuildProfile } from './guild/GetGuildProfile';
import { GetClientkey } from './extends/GetClientkey'; import { GetClientkey } from './extends/GetClientkey';
import { SendPacket } from './extends/SendPacket'; import { SendPacket } from './extends/SendPacket';
import { AllPoke } from "@/onebot/action/packet/AllPoke"; import { SendPoke } from "@/onebot/action/packet/SendPoke";
export function createActionMap(obContext: NapCatOneBot11Adapter, core: NapCatCore) { export function createActionMap(obContext: NapCatOneBot11Adapter, core: NapCatCore) {
@@ -221,7 +221,7 @@ export function createActionMap(obContext: NapCatOneBot11Adapter, core: NapCatCo
new SendGroupAiRecord(obContext, core), new SendGroupAiRecord(obContext, core),
new GetAiCharacters(obContext, core), new GetAiCharacters(obContext, core),
new SendPacket(obContext, core), new SendPacket(obContext, core),
new AllPoke(obContext, core), new SendPoke(obContext, core),
]; ];
type HandlerUnion = typeof actionHandlers[number]; type HandlerUnion = typeof actionHandlers[number];

View File

@@ -9,11 +9,11 @@ const SchemaData = Type.Object({
type Payload = Static<typeof SchemaData>; type Payload = Static<typeof SchemaData>;
export class AllPoke extends GetPacketStatusDepends<Payload, any> { export class SendPoke extends GetPacketStatusDepends<Payload, any> {
actionName = ActionName.AllPoke; actionName = ActionName.SendPoke;
payloadSchema = SchemaData; payloadSchema = SchemaData;
async _handle(payload: Payload) { async _handle(payload: Payload) {
await this.core.apis.PacketApi.pkt.operation.AllPoke(+payload.user_id, payload.group_id ? +payload.group_id : undefined); await this.core.apis.PacketApi.pkt.operation.SendPoke(+payload.user_id, payload.group_id ? +payload.group_id : undefined);
} }
} }

View File

@@ -146,5 +146,5 @@ export const ActionName = {
GetClientkey: "get_clientkey", GetClientkey: "get_clientkey",
AllPoke: 'all_poke', SendPoke: 'send_poke',
} as const; } as const;