Node

Constructor

new Magmastream.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.
resumeStatusbooleanWhether to resume the previous session. If false music will halt instantly.
resumeTimeoutnumberHow load to wait before resuming.
securebooleanWhether the host uses SSL.
prioritynumberSet the priority level of your node.

Overview

Properties

• manager

The main hub for interacting with Lavalink.

• options

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

• 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