Node
Table of contents
Constructors
Properties
Accessors
Methods
- checkNodeSession
- connect
- disconnect
- getInfo
- getRoutePlannerStatus
- getStats
- getVersion
- reconnect
- unmarkAllFailedAddress
- unmarkFailedAddress
- updateStats
- checkOptions
Constructors
constructor
• new Node(lavashark
, options
)
Create a new Node instance
Parameters
Name | Type | Description |
---|---|---|
lavashark | LavaShark | The LavaShark instance |
options | NodeOptions | The node options |
Defined in
Properties
options
• Readonly
options: NodeOptions
Defined in
rest
• rest: RESTController
Defined in
retryAttempts
• retryAttempts: number
Defined in
state
• state: NodeState
Defined in
stats
• stats: NodeStats
Defined in
version
• Optional
version: string
Defined in
Accessors
identifier
• get
identifier(): string
Returns
string
Defined in
totalPenalties
• get
totalPenalties(): number
Returns
number
Defined in
Methods
checkNodeSession
▸ checkNodeSession(): Promise
<void
>
Check session exists
Returns
Promise
<void
>
Defined in
connect
▸ connect(): void
Connect to node
Returns
void
Defined in
disconnect
▸ disconnect(): void
Disconnect from node
Returns
void
Defined in
getInfo
▸ getInfo(): Promise
<Info
>
Get the Lavalink Node information
Returns
Promise
<Info
>
Defined in
getRoutePlannerStatus
▸ getRoutePlannerStatus(): Promise
<RoutePlannerStatus
>
Gets the route planner status
Returns
Promise
<RoutePlannerStatus
>
Defined in
getStats
▸ getStats(): Promise
<NodeStats
>
Get the Lavalink Node stats
Returns
Promise
<NodeStats
>
Defined in
getVersion
▸ getVersion(): Promise
<string
>
Get the Lavalink Node version
Returns
Promise
<string
>
Defined in
reconnect
▸ reconnect(): Promise
<void
>
Reconnects the node
Returns
Promise
<void
>
Defined in
unmarkAllFailedAddress
▸ unmarkAllFailedAddress(): Promise
<void
>
Unmarks all failed address
Returns
Promise
<void
>
Defined in
unmarkFailedAddress
▸ unmarkFailedAddress(address
): Promise
<void
>
Unmarks a failed address
Parameters
Name | Type | Description |
---|---|---|
address | string | The address to unmark |
Returns
Promise
<void
>
Defined in
updateStats
▸ updateStats(): Promise
<void
>
Update node stats
Returns
Promise
<void
>
Defined in
checkOptions
▸ Static
checkOptions(options
): void
Parameters
Name | Type |
---|---|
options | NodeOptions |
Returns
void