Skip to content

DisTubeEventMap

Type Parameter Default type
Metadata undefined
Target VoiceChannelTarget
Property Type Description
queue.autoplay.failed Readonly<BaseQueueEvent<Metadata, Target> & object> -
queue.created Readonly<BaseQueueEvent<Metadata, Target>> -
queue.deleted Readonly<BaseQueueEvent<Metadata, Target> & object> -
queue.finished Readonly<BaseQueueEvent<Metadata, Target>> Playback ran out of successors; queue.deleted follows.
queue.item.added Readonly<BaseQueueEvent<Metadata, Target> & object> -
queue.item.failed Readonly<BaseQueueEvent<Metadata, Target> & object> -
queue.item.finished Readonly<BaseQueueEvent<Metadata, Target> & object> -
queue.item.started Readonly<BaseQueueEvent<Metadata, Target> & object> fallback is the Song another plugin’s search found and played, when the item’s own plugin has no stream.
queue.playlist.added Readonly<BaseQueueEvent<Metadata, Target> & object> One resolved Playlist committed as a whole; its items publish no per-item events.
queue.updated Readonly<BaseQueueEvent<Metadata, Target> & object> Published once per committed change to the queue’s state, its pause, its position by seek, or the volume or filters of its voice, after that commit’s own event and with the same state and timestamp. A call that changes nothing publishes none. position and playbackRate are read at the commit, so while state.status is playing the position is about position + (Date.now() - timestamp) / 1000 * playbackRate.
voice.disconnected Readonly<BaseVoiceEvent<Target> & object> Published once per DisTubeVoice, after that guild’s queue.deleted. removed means the platform removed the bot, such as a member disconnecting it, and carries no error. platform means the connection dropped beyond the Adapter’s recovery and carries a VOICE_DISCONNECTED error whose cause is the Adapter’s error.