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
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.
Resume Track
Resume the current track & player, if it's paused.
Skip Track
Skip the current track of a guild player. The new track will be returned.
Stop Track
Stop the current track of a guild player. This will also remove the current track from the queue.
Load Local Track
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)
Play First Track
Play the specified track in the specified guild. You can specify either the track must be forced to play, and interrupt the current one.
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
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.
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
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.
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.
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.
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.
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.
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.
Track & Playlist Properties
Playlist Tracks
Returns audiotrack Requires LavaPlayer v2.1.0
Get all the ordered tracks of a loaded playlist.
Playlist Name
Returns string Requires LavaPlayer v2.1.0
Get the name of a loaded playlist.
Track Author
Returns string Requires LavaPlayer v2.1.0
Return the author of a specific track
Track Duration
Returns timespan Requires LavaPlayer v2.1.0
Return the duration of a specific track
Track Identifier
Returns string Requires LavaPlayer v2.1.0
Return the unique identifier of a track
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...)!
Track Thumbnail
Returns string Requires LavaPlayer v2.1.0
Return the thumbnail URL of a specific track
Track Title
Returns string Requires LavaPlayer v2.1.0
Return the title of a specific track
Track URL
Returns string Requires LavaPlayer v2.1.0
Return the YouTube URL of a 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.
Loaded Playlist
Returns audioplaylist Requires LavaPlayer v2.1.0
Represent the loaded playlist in a 'on playlist loaded' sub-load section.
Loaded Track
Returns audiotrack Requires LavaPlayer v2.1.0
Represent the loaded track in a 'on single load' sub-load section.