Node
ruvyrias / Node
Class: Node
Defined in: src/Node.ts:84
Represents a connection to a Lavalink node, allowing communication and control over audio playback.
Constructors
Constructor
new Node(
ruvyrias
,node
,options
):Node
Defined in: src/Node.ts:100
The Node class that is used to connect to a lavalink node
Parameters
ruvyrias
node
options
Returns
Node
Properties
extras
readonly
extras:Omit
<Extras
,"library"
>
Defined in: src/Node.ts:92
options
readonly
options:NodeGroup
Defined in: src/Node.ts:91
rest
readonly
rest:Rest
Defined in: src/Node.ts:89
restURL
readonly
restURL:string
Defined in: src/Node.ts:87
ruvyrias
ruvyrias:
Ruvyrias
Defined in: src/Node.ts:85
socketURL
readonly
socketURL:string
Defined in: src/Node.ts:88
stats
stats:
null
|NodeStats
Defined in: src/Node.ts:90
ws
ws:
null
|WebSocket
Defined in: src/Node.ts:86
Accessors
name
Get Signature
get name():
string
Defined in: src/Node.ts:216
Returns the name of the node.
Returns
string
The name of the node.
penalties
Get Signature
get penalties():
number
Defined in: src/Node.ts:224
Gets the penalties associated with the current node.
Returns
number
The total amount of penalties.
Methods
connect()
connect():
Promise
<void
>
Defined in: src/Node.ts:131
Establishes a connection to the Lavalink node.
Returns
Promise
<void
>
disconnect()
disconnect():
Promise
<void
>
Defined in: src/Node.ts:178
Disconnects the Lavalink node.
Returns
Promise
<void
>
void
reconnect()
reconnect():
Promise
<void
>
Defined in: src/Node.ts:160
Initiates a reconnection attempt to the Lavalink node.
Returns
Promise
<void
>
send()
send(
payload
):void
Defined in: src/Node.ts:200
Sends a payload to the Lavalink node.
Parameters
payload
any
The payload to be sent.
Returns
void