Extends
- EventEmitter
Members
(private) _immediates :Set.<Immediate>
Intervals set by BaseClient#setImmediate that are still active
Type:
- Set.<Immediate>
- Source:
(private) _intervals :Set.<Timeout>
Intervals set by BaseClient#setInterval that are still active
Type:
- Set.<Timeout>
- Source:
(private) _timeouts :Set.<Timeout>
Timeouts set by BaseClient#setTimeout that are still active
Type:
- Set.<Timeout>
- Source:
(private, readonly) api :Object
API shortcut
Type:
- Object
- Source:
options :ClientOptions
The options the client was instantiated with
Type:
- Source:
(private) rest :RESTManager
The REST manager of the client
Type:
- RESTManager
- Source:
Methods
clearImmediate(immediate)
Clears an immediate.
Parameters:
Name | Type | Description |
---|---|---|
immediate |
Immediate | Immediate to cancel |
- Source:
clearInterval(interval)
Clears an interval.
Parameters:
Name | Type | Description |
---|---|---|
interval |
Timeout | Interval to cancel |
- Source:
clearTimeout(timeout)
Clears a timeout.
Parameters:
Name | Type | Description |
---|---|---|
timeout |
Timeout | Timeout to cancel |
- Source:
(private) decrementMaxListeners()
Decrements max listeners by one, if they are not zero.
- Source:
destroy()
Destroys all assets used by the base client.
- Source:
(private) incrementMaxListeners()
Increments max listeners by one, if they are not zero.
- Source:
setImmediate(fn, …args) → {Immediate}
Sets an immediate that will be automatically cancelled if the client is destroyed.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
fn |
function | Function to execute | |
args |
* |
<repeatable> |
Arguments for the function |
- Source:
Returns:
- Type
- Immediate
setInterval(fn, delay, …args) → {Timeout}
Sets an interval that will be automatically cancelled if the client is destroyed.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
fn |
function | Function to execute | |
delay |
number | Time to wait between executions (in milliseconds) | |
args |
* |
<repeatable> |
Arguments for the function |
- Source:
Returns:
- Type
- Timeout
setTimeout(fn, delay, …args) → {Timeout}
Sets a timeout that will be automatically cancelled if the client is destroyed.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
fn |
function | Function to execute | |
delay |
number | Time to wait before executing (in milliseconds) | |
args |
* |
<repeatable> |
Arguments for the function |
- Source:
Returns:
- Type
- Timeout