Skip to content

Client

Type Parameters

Type ParameterDefault type
T extends Transformers-
C extends CacheManagerStructureCacheManagerStructure

Constructors

new Client()

new Client<T, C>(options, debug?): Client<T, C>

Parameters

ParameterType
optionsBaseClientOptions<T>
debug?DebugFunction

Returns

Client<T, C>

Defined in

client.ts:60

Properties

user

readonly user: GetUserType<T>

Defined in

client.ts:35


sessionId

readonly sessionId: string

Defined in

client.ts:36


application

readonly application: Structure

Defined in

client.ts:37


rest

readonly rest: REST

Defined in

client.ts:52


cache

readonly cache: C

Defined in

client.ts:53

Methods

login()

login(token): Promise<string>

Parameters

ParameterType
tokenstring

Returns

Promise<string>

Defined in

client.ts:75


close()

close(): void

Returns

void

Defined in

client.ts:82


setPresence()

setPresence(presence): void

Parameters

ParameterType
presenceUpdatePresenceStructure

Returns

void

Defined in

client.ts:87


ping()

ping(): Promise<object>

Both numbers are represented in ms

Returns

Promise<object>

ws

ws: number

rest

rest: number

Defined in

client.ts:92