Skip to content

Stay Online

MrCakeSlayer edited this page Sep 24, 2022 · 1 revision
This feature is in beta.

Lavalink4NET supports always online / stay-online which moves the players of a crashed / disconnected lavalink node to a new free node. This function is only supported for node clusters.

The feature is useful for huge bots where uptime is expected from, even if a node server crashes or shuts down.

Configuring Stay-Online

Configuring Stay-Online

var options = new LavalinkClusterOptions {
    [...],
    StayOnline = true
};

var cluster = new LavalinkCluster(options);
[...]

The configuration of stay-online is very easy the only thing you need to is to set the "StayOnline" property in the cluster options to true.

After that when a node disconnects from the cluster (does not matter if added dynamically) the players of the node will be moved to a new node. Also it will be tried to reconnect to the disconnected node, so that new players can connect to it.