mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-19 09:13:58 +00:00
feat(packages/api): add force disconnecting and disconnected getter in APIClient
This commit is contained in:
@@ -163,13 +163,17 @@ export default class Client {
|
||||
/**
|
||||
* Disconnects the client from the API
|
||||
*/
|
||||
disconnect() {
|
||||
this.ws.disconnect()
|
||||
disconnect(force?: boolean) {
|
||||
this.ws.disconnect(force)
|
||||
}
|
||||
|
||||
#throwIfNotReady() {
|
||||
if (!this.isReady()) throw new Error('Client is not ready')
|
||||
}
|
||||
|
||||
get disconnected() {
|
||||
return this.ws.disconnected
|
||||
}
|
||||
}
|
||||
|
||||
export class ClientWebSocketPacketAwaiter {
|
||||
|
||||
Reference in New Issue
Block a user