export declare class AudioPlayer extends EventEmitter
Used to play audio resources (i.e. tracks, streams) to voice connections.
readonlyVoiceConnection[] playable :
A list of subscribed voice connections that can currently receive audio to play.
AudioPlayerState state :
The state that the player is in.
checkPlayableboolean () :
Checks whether the underlying resource (if any) is playable (readable)
Returns: true
if the resource is playable, otherwise false
Pauses playback of the current resource, if any.
Returns: true
if the player was successfully paused, otherwise false
playMetadata
>(resource: AudioResource<Metadata>) : void <
Metadata
Plays a new resource on the player. If the player is already playing a resource, the existing resource is destroyed (it cannot be reused, even in another player) and is replaced with the new resource.
Stops playback of the current resource and destroys the resource. The player will either transition to the Idle state, or remain in its current state until the silence padding frames of the resource have been played.
Returns: true
if the player will come to a stop, otherwise false
unpauseboolean () :
Unpauses playback of the current resource, if any.
Returns: true
if the player was successfully unpaused, otherwise false
onevent: 'error'listener: (error: AudioPlayerError) => void) : this (
Emitted when there is an error emitted from the audio resource played by the audio player