Skip to content

Client

Implements

Constructors

new Client()

new Client(options, debug?): Client

Parameters

ParameterType
optionsClientOptions
debug?DebugFunction

Returns

Client

Defined in

client.ts:38

Properties

rest

readonly rest: REST

Defined in

client.ts:27


cache

readonly cache: CacheManagerStructure

Implementation of

MockClient.cache

Defined in

client.ts:28


ws

readonly ws: WebSocketManager

Defined in

client.ts:29


user

readonly user: Structure

By default this is a UserStructure, but can change according to your transformers

Implementation of

MockClient.user

Defined in

client.ts:31


sessionId

readonly sessionId: string

Implementation of

MockClient.sessionId

Defined in

client.ts:32


application

readonly application: Structure

Implementation of

MockClient.application

Defined in

client.ts:33

Methods

login()

login(token, dispatch): Promise<string>

Parameters

ParameterType
tokenstring
dispatchundefined | DispatchFunction

Returns

Promise<string>

Defined in

client.ts:53


close()

close(): void

Returns

void

Defined in

client.ts:61


ping()

ping(): Promise<object>

Both numbers are represented in ms.

This function requires Bun to work.

Returns

Promise<object>

ws

ws: number

rest

rest: number

Defined in

client.ts:71