Skip to content

Node

Constructor

js
new Node(options: NodeOptions)

Properties

OptionsTypeDescription
hoststringThe host for the node.
identifierstringThe identifier for the node.
passwordstringThe password for the node.
portnumberThe port for the node.
retryAmountnumberHow many tries connect to the node if connection failed.
retryDelaynumberTimeout to retry connecting to the node if connection failed.
securebooleanWhether the host uses SSL.
searchbooleanWhether to enable the search functionality.
playbackbooleanWhether to enable the playback.
versionv4|v3The version of the node.

Overview

PropertiesMethods
managerconnect
optionsdestroy
socket
stats
connected

Properties

• manager

The main hub for interacting with Lavalink.

Type
Manager

• options

The object that must be created to connect to a Lavalink server.

Type
NodeOptions

• socket

The socket for the node.

TypeValue
WebSocket or nullnull

• stats

The stats for the node.

PropertiesTypeDescription
cpuCPUStatsThe cpu stats for the node.
frameStatsFrameStatsThe frame stats for the node.
memoryMemoryStatsThe memory stats for the node.
playersnumberThe amount of players on the node.
playingPlayersnumberThe amount of playing players on the node.
uptimenumberThe uptime for the node.

get connected

Whether the node is connected.

Type
boolean

Methods

• connect()

DescriptionReturns
Connects to the Node.void

• destroy()

DescriptionReturns
Destroys the Node and all players connected with it.void