Client
Type Parameters
Type Parameter | Default type |
---|---|
T extends Transformers | - |
C extends CacheManagerStructure | CacheManagerStructure |
Constructors
new Client()
new Client<
T
,C
>(options
,debug
?):Client
<T
,C
>
Parameters
Parameter | Type |
---|---|
options | BaseClientOptions <T > |
debug ? | DebugFunction |
Returns
Client
<T
, C
>
Defined in
Properties
user
readonly
user:GetUserType
<T
>
Defined in
sessionId
readonly
sessionId:string
Defined in
application
readonly
application:Structure
Defined in
rest
readonly
rest:REST
Defined in
cache
readonly
cache:C
Defined in
Methods
login()
login(
token
):Promise
<string
>
Parameters
Parameter | Type |
---|---|
token | string |
Returns
Promise
<string
>
Defined in
close()
close():
void
Returns
void
Defined in
setPresence()
setPresence(
presence
):void
Parameters
Parameter | Type |
---|---|
presence | UpdatePresenceStructure |
Returns
void
Defined in
ping()
ping():
Promise
<object
>
Both numbers are represented in ms
Returns
Promise
<object
>
ws
ws:
number
rest
rest:
number