Module twilight_lavalink::node

source ·
Expand description

Nodes for communicating with a Lavalink server.

Using nodes, you can send events to a server and receive events.

This is a bit more low level than using the Lavalink client because you will need to provide your own VoiceUpdate events when your bot joins channels, meaning you will have to accumulate and combine voice state update and voice server update events from the Discord gateway to send them to a node.

Additionally, you will have to create and manage your own PlayerManager and make your own players for guilds when your bot joins voice channels.

This can be a lot of work, and there’s not really much reason to do it yourself. For that reason, you should almost always use the Lavalink client which does all of this for you.


  • Stream of incoming events from a node.
  • A connection to a single Lavalink server. It receives events and forwards events from players to the server.
  • The configuration that a Node uses to connect to a Lavalink server.
  • An error occurred while either initializing a connection or while running its event loop.
  • Send outgoing events to the associated node.
  • An error that can occur while sending an event over a node.
  • Configuration for a session which can be resumed.