Types & Enums
Global type aliases and enums used for defining states, strategies, and options in Moonlink.js.
Enums
NodeState
Connection state of a Lavalink node.
The node is currently attempting to establish a WebSocket connection.
The WebSocket connection is open.
The connection has been closed.
The node has been permanently removed and will not reconnect.
The node has sent the 'ready' payload and is available for use.
The node is resuming a previous session.
LoadType
The type of result returned by a search or track load.
A single track was loaded.
A playlist was loaded.
A search result list was returned.
No matches were found.
An error occurred during loading.
VoiceConnectionState
State of the Discord voice connection.
Handshaking with Discord.
Successfully connected to the voice server.
Disconnected from the voice channel.
The connection has been cleaned up.
Types
NodeSortStrategy
Strategies for selecting the best available node.
(Default) Balances between CPU and player count.
Selects the node with the fewest total players.
Selects the node with the fewest active players.
Selects the node with the most free memory.
Selects the node with the lowest system CPU load.
Selects the node with the highest uptime.
Selects a node randomly.
Selects based on the manually assigned priority value.
PlayerLoop
Loop modes for the player.
No looping.
Repeats the current track indefinitely.
Repeats the entire queue.
TrackEndReason
Reason why a track finished playing.
The track played to completion.
The track failed to load or crashed.
The player was stopped manually.
The track was replaced by another track (e.g. play() called while playing).
The player was destroyed or cleaned up.
TPartialTrackProperties
Track properties that can be partially loaded.
title | author | duration | identifier | isSeekable | isStream | uri | artworkUrl | isrc | sourceName | position | requester | origin | pluginInfo | userData | retries | time