Node
Table of Contentsโ
Class Definitionโ
export class Node {}
Propertiesโ
Property Type Description infoLavalinkInfoThe node info. isNodeLinkboolean Whether the node is a node link. restRestThe rest instance. sessionIdstring The session ID. socketWebSocket The socket. statsNodeStatsThe node stats.
Constructorโ
new Node(manager: Manager, options: NodeOptions)
Parameter Type Description Optional managerManagerThe manager instance. optionsNodeOptionsThe node options.
Methodsโ
address()โ
address(): stringReturns the full address for this node, including the host and port.
connect()โ
async connect(): Promise<void>Connects to the node.
connected()โ
connected(): booleanChecks if the Node is currently connected.
createSessionIdsFile()โ
createSessionIdsFile(): voidCreates a session ids file for this node.
deleteSponsorBlock()โ
warning
โ ๏ธ This method only works when the node has the sponsor block plugin.
async deleteSponsorBlock(player: Player): Promise<void>Deletes the sponsor block for this node.
Parametersโ
Parameter Type Description Optional playerPlayerThe player.
error()โ
warning
โ ๏ธ This method is protected and should not be called directly.
error(error: Error): voidHandles an error.
Parametersโ
Parameter Type Description Optional errorError The error.