Skip to content

LavaPlayer

Docs has been Updated!

You're now viewing the full documentation for LavaPlayer v2.1+

Warning

Load sections are not listed here. Feel free to use the sample code provided here as it'll be much easier to understand.

Effects

Pause Track

Requires LavaPlayer v2.1.0

Pause the current track & player. This won't clear the queue, nor will remove the current track. You can use 'resume track' to resume the track.

pause [the] (audio|track) (in|of) [the] [guild] %guild% [with [the] [bot] %bot%]
pause the track of event-guild

Resume Track

Requires LavaPlayer v2.1.0

Resume the current track & player, if it's paused.

resume [the] (audio|track) (in|of) [the] [guild] %guild% [with [the] [bot] %bot%]
resume the track of event-guild

Skip Track

Requires LavaPlayer v2.1.0

Skip the current track of a guild player. The new track will be returned.

skip [the] (audio|track) (in|of) [the] [guild] %guild% [with [the] [bot] %bot%] [and store (it|[the] audiotrack) in %-objects%]
skip the track of event-guild and store it in {_track}
skip track of event-guild

Stop Track

Requires LavaPlayer v2.1.0

Stop the current track of a guild player. This will also remove the current track from the queue.

stop [the] (audio|track) (in|of) [the] [guild] %guild% [with [the] [bot] %bot%]
stop the track of event-guild

Load Local Track

Requires LavaPlayer v2.1.0

Loads a local track from the files of your server. The supported file types are:

  • MP3
  • FLAC
  • WAV
  • Matroska/WebM (AAC, Opus or Vorbis codecs)
  • MP4/M4A (AAC codec)
  • OGG streams (Opus, Vorbis and FLAC codecs)
  • AAC streams
  • Stream playlists (M3U and PLS)
load local track [from] [the] [file] %string% and store (it|the track) in %-objects%
load local track from "plugins/music/mytrack.mp3" and store it in {_track}

Play First Track

Requires LavaPlayer v2.1.0

Play the specified track in the specified guild. You can specify either the track must be forced to play, and interrupt the current one.

[force] play [the] [track] %audiotrack/audioplaylist% [the] [first] [track] [of the queue] in %guild% [with [the] [bot] %bot%]
play {_track} in event-guild
force play {_track} in event-guild

Expressions

Audio Effects

Audio Mono Level

Returns number Requires LavaPlayer v2.1.0

This is an audio effect/filter. Set the mono level of the current audio track. The default value is 1.0

[the] (audio|track) mono [level] of %guild%
%guild%'[s] (audio|track) mono [level]
set mono level of event-guild to 0.5

Audio Pitch

Returns number Requires LavaPlayer v2.1.0

This is an audio effect/filter. Change the pitch of the current audio track. The default pitch is 1.0.

[the] (audio|track) pitch [level] of %guild%
%guild%'[s] (audio|track) pitch [level]
set audio speed of event-guild to 1.5

Audio Rotation

Returns number Requires LavaPlayer v2.1.0

This is an audio effect/filter. Change the rotation of the current audio track. (Sort of 8D effect) The default rotation is 1

[the] (audio|track) rotation [level] of %guild%
%guild%'[s] (audio|track) rotation [level]
set audio rotation of event-guild to 2

Audio Speed

Returns number Requires LavaPlayer v2.1.0

This is an audio effect/filter. Change the speed of the current audio track. The default speed is 1.0.

[the] (audio|track) speed [level] of %guild%
%guild%'[s] (audio|track) speed [level]
set audio speed of event-guild to 2

Guild Properties

Guild Playing Track

Returns audiotrack Requires LavaPlayer v2.1.0

Get the current track playing in a guild. This cannot be changed via this expression, but you can use the 'play' effect to play a track.

[all] [the] [audio] playing track of %guild%
[all] [the] %guild%'[s] [audio] playing track
set {_track} to playing track of event-guild

Guild Queue

Returns audiotrack Requires LavaPlayer v2.1.0

Represents the audio queue of a guild. You can get the queue, but also add or remove tracks from it.

[all] [the] [audio] queue of %guild%
[all] [the] %guild%'[s] [audio] queue
if queue of event-guild is empty:
add {_track} to queue of event-guild

Guild Auto Play

Returns boolean Requires LavaPlayer v2.1.0

If enabled, when a track ends, the next will be played automatically. By default, this is disabled.

[the] [auto[( |-)]]play [state] of %guild%
%guild%'[s] [auto[( |-)]]play [state]
set auto play of event-guild to true

Guild Repeat

Returns boolean Requires LavaPlayer v2.1.0

If enabled, when a track ends, the same track will be played again. By default, this is disabled.

[the] [auto[( |-)]]repeat [state] of %guild%
%guild%'[s] [auto[( |-)]]repeat [state]
set repeat of event-guild to true

Guild Volume

Returns integer Requires LavaPlayer v2.1.0

Get the volume of a guild, or null if the guild have not player. This can be changed to change the audio volume of a guild. If the guild does not have any player, nothing will change. Note that the volume is a number between 0 and 1000.

[the] [audio[ ]]guild volume of %guild%
%guild%'[s] [audio[ ]]guild volume
set guild volume of event-guild to 100
set {_volume} to guild volume of event-guild

Track & Playlist Properties

Playlist Tracks

Returns audiotrack Requires LavaPlayer v2.1.0

Get all the ordered tracks of a loaded playlist.

[all] [the] [audio[ ]]tracks of %audioplaylist%
[all] [the] %audioplaylist%'[s] [audio[ ]]tracks
set {_tracks::*} to tracks of the loaded playlist

Playlist Name

Returns string Requires LavaPlayer v2.1.0

Get the name of a loaded playlist.

[the] [audio[ ]]playlist name of %audioplaylist%
%audioplaylist%'[s] [audio[ ]]playlist name
playlist name of the loaded playlist

Track Author

Returns string Requires LavaPlayer v2.1.0

Return the author of a specific track

[the] [discord] [audio] track author of %audiotrack%
%audiotrack%'[s] [discord] [audio] track author
set {_author} to author of last played track.

Track Duration

Returns timespan Requires LavaPlayer v2.1.0

Return the duration of a specific track

[the] [discord] [audio] track duration of %audiotrack%
%audiotrack%'[s] [discord] [audio] track duration
set {_duration} to duration of last played track.

Track Identifier

Returns string Requires LavaPlayer v2.1.0

Return the unique identifier of a track

[the] [discord] [audio] track id[entifier] of %audiotrack%
%audiotrack%'[s] [discord] [audio] track id[entifier]
set {_id} to identifier of current track of event-guild

Track Position

Returns timespan Requires LavaPlayer v2.1.0

Return the position of a specific track This property can be changed to move the current position of the track. It will only accept timespan (e.g. '1 second', '25 minutes', etc...)!

[the] [discord] [audio] track position of %audiotrack%
%audiotrack%'[s] [discord] [audio] track position
set {_position} to track position of track event-bot is playing in event-guild
add 10 second to track position of track event-bot is playing in event-guild

Track Thumbnail

Returns string Requires LavaPlayer v2.1.0

Return the thumbnail URL of a specific track

[the] [discord] [audio] track thumbnail of %audiotrack%
%audiotrack%'[s] [discord] [audio] track thumbnail
set thumbnail of embed to thumbnail of last played track.

Track Title

Returns string Requires LavaPlayer v2.1.0

Return the title of a specific track

[the] [discord] [audio] track title of %audiotrack%
%audiotrack%'[s] [discord] [audio] track title
set {_title} to title of last played track.

Track URL

Returns string Requires LavaPlayer v2.1.0

Return the YouTube URL of a track

[the] [discord] [audio] track (url|uri) of %audiotrack%
%audiotrack%'[s] [discord] [audio] track (url|uri)
set {_url} to url of last played track.

Loading Results

Load Exception

Returns string Requires LavaPlayer v2.1.0

Represent the exception that occurred during the load of a research or items. This is the message only.

[the] exception
the exception

Loaded Playlist

Returns audioplaylist Requires LavaPlayer v2.1.0

Represent the loaded playlist in a 'on playlist loaded' sub-load section.

[the] loaded playlist
loaded playlist

Loaded Track

Returns audiotrack Requires LavaPlayer v2.1.0

Represent the loaded track in a 'on single load' sub-load section.

[the] loaded track
loaded track