Attaches logic to the audio player and binds it to the voice connection.
The ID of the guild where the voice connection is established.
The {@link AudioPlayer} instance from @discordjs/voice.
Stores volume amount before muting the player, which can be restored back when unmuting the player.
Returns the amount of volume in percentage (0 to 100) of the player resource.
To detect if currently underlying resource (if any) has inline volume enabled or not.
true
if inline volume is enabled, otherwise false
.
Plays the input audio resource, and any previously playing resource gets destroyed and replaced.
The audio resouce.
Plays the input audio resource, and any previously playing resource gets destroyed and replaced.
Can be either :
Changes volume of the underlying resource of the player.
Percentage of volume to set (0 to 100).
true
if volume is changed successfully, otherwise false
.
Stops the audio player and destroys any underlying resource.
true
if the player will come to a stop, otherwise false
.
Mutes/Unmutes the audio player.
true
if player was muted, otherwise false
.
Pauses/unpauses the audio player.
true
if player is paused, else false
i.e. unpaused.
Generated using TypeDoc
The audio player class of
discord-play
.Must be created only after a voice connection is established, either through a DisPlayConnection instance or the @discordjs/voice
joinVoiceChannel
function.