Node

Manages the connection between the client and the Lavalink server just like how Max Caufield had control over time.

Constructor

new Node(automata: Manager, node: NodeOptions, options: AutomataOptions)

Properties

.options

The connection options for the player.

Type: NodeOptions

.isConnected

Indicates whether the client has connected to the node or not.

Type: Boolean

.regions

The array of regions.

Type: Array

.sessionId

The node's session ID.

Type: String

.rest

The node's REST instance.

Type: Rest

.stats

The node's stats.

Type: NodeStats

Methods

.connect()

Connects to the Lavalink server using the WebSocket.

Returns: void

Exemple

<Node>.connect()

.send(payload)

Sends the payload to the Node.

ParameterTypeDescription
dataunknownSends the provided data (payload) to the node.

Returns: void

Exemple

<Node>.send(payload);

.reconnect()

Reconnects the client to the Node.

Returns: void

Exemple

<Node>.reconnect()

.disconnect()

Disconnects the client from the Node.

Returns: void

Exemple:

<Node>.disconnect()