Skip to content

BaseClient

Calculus edited this page Feb 23, 2024 · 4 revisions

The base class for all clients.

extends EventEmitter

Constructor

constructor(options?)

Name Type Optional
options ClientOptions Yes

Properties

.options : ClientOptions

The options the client was instantiated with

Methods

.destroy() : Promise<void>

Destroys all assets used by the base client.

.login(token: string | { username: string, password: string }) : Promise<void>

Logs into the application through the client.

Name Type Optional
token string Yes
options LoginOptions Yes

.reconnect() : Promise<void>

Reconnect the client.

.subscribe() : Promise<void>

Subscribe to events from a channel.

.unsubscribe() : Promise<void>

Unsubscribe from events from a channel.

Clone this wiki locally