Player - JohnnyMorganz/discordia-lavalink GitHub Wiki
Constructor:
Player(VoiceManager, LavalinkNode, Guild, GuildVoiceChannel)
NOTE: YOU SHOULD NEVER HAVE TO CALL A PLAYER CONSTRUCTOR
Properties
boolean
Player.playing
If a track has currently been loaded
NOTE: This will be true
even if the track is currently paused
boolean
Player.paused
If the track has been paused
table|nil
Player.track
The loaded track for the player. This table is the one retrieved from the API. View more here
table
Player.info
Returns data about the Player and the track. This contains:
volume
: The volume of the Player, 0 - 1000startedAt
: UTC epoch time when the track was startedposition
: The current position of the track in millisecondslastChecked
: UTC epoch time when the last information about position was provided
Methods
table
track, table?
options)
Player:play(Play a track. The track specified should be retrieved from the API. Options can include:
startTime
: position where track should be startedendTime
: position where track should be ended
boolean
pause)
Player:pause(Toggle if the player is paused
Player:resume()
Alias for Player:pause(false)
Player:stop()
Stop the track and clear it
number
position)
Player:seek(Seek to a position in the track, in milliseconds
number?
volume)
Player:volume(Set the volume of the player
Default: 100
Range: 0 - 1000
number
band, number
gain)
Player:equalizer(Utilize the player equalizer
Range of band: 0 - 14
Range of gain: -0.25 - 1
Player:destroy()
Internally delete the Player
NOTE: You should use VoiceManager:leave()
instead