refactor: add available accessor property in PacketClient
This commit is contained in:
1 parent
ef39e7ab01
commit
ba9afcaa06
8 files changed
+13
-9
No files matched your search
@@ -17,7 +17,7 @@ export class GetUserStatus extends BaseAction<Payload, { status: number; ext_sta
|
||||
payloadSchema = SchemaData;
|
||||
|
||||
async _handle(payload: Payload) {
|
||||
if (!this.core.apis.PacketApi.packetClient?.isConnected) {
|
||||
if (!this.core.apis.PacketApi.packetClient?.available) {
|
||||
throw new Error('packetClient is not init');
|
||||
}
|
||||
return await this.core.apis.PacketApi.sendStatusPacket(+payload.user_id);
|
||||
|
||||
Reference in new issue
Block a user