Create a new Lavalink node.
The manager for the node.
The options for the node.
const node = new Node(nodeManager, {
host: "localhost",
port: 2333,
password: "youshallnotpass",
id: "node1",
secure: false,
retryAmount: 5,
retryDelay: 20000,
restTimeout: 10000,
sessionId: null,
});
node.connect();
console.log(node.id); // node1
console.log(node.address); // ws://localhost:2333/v4/websocket
console.log(node.penalties); // the penalties of the node
console.log(node.state); // the state of the node
ReadonlydecodeThe decode methods for the node.
The public info of the node.
ReadonlylyricsThe lyrics manager for the node.
ReadonlynodeThe manager for the node.
ReadonlyoptionsThe options for the node.
The interval for the reconnect.
ReadonlyrestThe REST for the node.
The amount of reconnect attempts left.
ReadonlyretryThe delay between reconnect attempts.
The session of the node.
The session id of the node.
The state of the node.
The public stats of the node.
The WebSocket for the node.
Destroy the node.
Optionaldestroy: NodeDestroyInfo = {}The destroy options for the node.
Disconnect the node from the websocket.
Optionaldisconnect: NodeDestroyInfo = {}The disconnect options for the node.
OptionalmessageDefine a custom event handler for the node.
The payload to send to the node.
Search for a query.
The query to search for.
Stop the track in player for the guild.
The guild id to stop the player.
Update the player data.
The player data to update.
Update the session for the node
The session resuming options.
Class representing a Lavalink node. Node