feat: create abstract NetworkClient with register, status, and ready methods. status calls getNetworkModuleStatus
This commit is contained in:
parent
19167acec2
commit
711b1341b8
|
@ -0,0 +1,16 @@
|
|||
import { Client } from "../client.js";
|
||||
import { getNetworkModuleStatus } from "#api.js";
|
||||
|
||||
export default abstract class NetworkClient extends Client {
|
||||
public async register() {
|
||||
return this.callModuleReturn("register");
|
||||
}
|
||||
|
||||
public async status(callback?: any): Promise<void | (() => Promise<void>)> {
|
||||
return getNetworkModuleStatus(callback, undefined, this.connectModule);
|
||||
}
|
||||
|
||||
public async ready() {
|
||||
return this.callModuleReturn("ready");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue