How it works

Graphical Display

Drawing
How a Lavalink Client works (roughly)
  1. First you have to create a manager:

TIP: I'd recommend adding the manager to the client, like this: client.manager = new LavalinkManager...

  1. Create a player:

  1. Connect the player

  1. Search with the player:

  1. Add the search result tracks / first result track (single) to the queue:

  1. In order to play the next song of the queue:

if you are playing a song, and want to play the next song, you have to run:

If you want to leave channel, run player.disconnect(), you can then change voice channel and run player.connect() again.

If you want to stop playing and re-create the player, run:

To get the Player after it was created somewhere else, use:

  1. Wanna know if a track Starts to play / ends playing, queue ends. etc. etc. Then listen to events!

For more information, also such as automated options for manager / players, check out the Documentation Page

Last updated