refactor: further decoupling of Packet and Core parts

This commit is contained in:
pk5ls20
2024-10-14 17:51:21 +08:00
parent 9126bac40a
commit eabfffba65
9 changed files with 68 additions and 42 deletions

View File

@@ -18,7 +18,7 @@ export class GroupPoke extends BaseAction<Payload, any> {
payloadSchema = SchemaData;
async _handle(payload: Payload) {
if (!this.core.apis.PacketApi.packetClient?.available) {
if (!this.core.apis.PacketApi.available) {
throw new Error('PacketClient is not init');
}
await this.core.apis.PacketApi.sendPokePacket(+payload.group_id, +payload.user_id);