🎵Player

Represents a Player instance

Methods

Constructor

new Player(options)

Property
Description
Type

options

The Player options

Properties

Name
Description
Type

node

The lavalink node that this player is connected to

filters

The filters instance of this player

guildId

The guild id of this player

voiceChannelId

The voice channel id of this player

textChannelId

The text channel id of this player

selfMute

Whether or not this player is muted

selfDeaf

Whether or not this player is deafened

current

The current track of this player

queue

The queue of this player

trackRepeat

Whether to repeat the current track

queueRepeat

Whether to repeat the queue

playing

Whether this player is playing or not

paused

Whether this player is paused or not

state

The state of player's connection

voiceState

The player voicestate

position

The player position

exactPosition

The exact player position

queueDuration

The queue duration, in milliseconds (DEPRECATED, use queue.duration)

volume

The player volume [0, 500]

recorder

Gets the player recorder object

Methods

connect()

Connects the bot to the voice channel

disconnect()

Disconnects the bot from the voice channel

destroy()

Destroys the player and disconnects the bot from the voice channel

moveNode()

Moves the player to another lavalink node

Parameter
Description

node

pause()

Pauses or resumes the player

Parameter
Description

state

ping()

Gets the latency between discord voice gateway & lavalink node.

Returns
Description

The latency value

play()

Plays a track

Parameter
Description

options

options.startTime

options.endTime

options.noReplace

seek()

Seek to a specific position in the track

Parameter
Description

position

setSelfDeaf()

Sets the bot's deaf state

Parameter
Description

state

setSelfMute()

Sets the bot's mute state

Parameter
Description

state

setTrackLoop()

Toggles the track repeating

Parameter
Description

state

setQueueLoop()

Toggles the queue repeating

Parameter
Description

state

setVoiceChannel()

Sets the player voice channel

Parameter
Description

voiceChannelId

shuffleQueue() (DEPRECATED) Use player.queue.shuffle()

Shuffles the queue

skip()

Parameter
Description

amount

Last updated