DisTubeEvents
type DisTubeEvents = object;The arguments of every Events event.
It is the source of truth of the signature of the event listeners:
Properties
Section titled “Properties”addList
Section titled “addList”addList: [queue: Queue, playlist: Playlist];Emitted after a new playlist is added to a Queue.
addSong
Section titled “addSong”addSong: [queue: Queue, song: Song];Emitted after a new song is added to a Queue.
changeFilter
Section titled “changeFilter”changeFilter: [queue: Queue, newFilters: string[], oldFilters: string[]];Emitted when the audio filters of a Queue are changed.
debug: [debug: string];Emitted to provide debug information from DisTube’s operation.
deleteQueue
Section titled “deleteQueue”deleteQueue: [queue: Queue];Emitted when a Queue is deleted.
disconnect
Section titled “disconnect”disconnect: [queue: Queue];Emitted when the bot is disconnected from a voice channel.
empty: [queue: Queue];Emitted when a Queue runs out of songs to play.
error: [error: Error, queue: Queue, song: Song | undefined];Emitted when DisTube encounters an error while playing songs.
ffmpegDebug
Section titled “ffmpegDebug”ffmpegDebug: [debug: string];Emitted for logging FFmpeg debug information.
finish
Section titled “finish”finish: [queue: Queue];Emitted when a Queue is finished, and its autoplay mode is disabled.
finishSong
Section titled “finishSong”finishSong: [queue: Queue, song: Song];Emitted when a song finished playing.
initQueue
Section titled “initQueue”initQueue: [queue: Queue];Emitted when a Queue is initialized.
noRelated
Section titled “noRelated”noRelated: [queue: Queue, error: DisTubeError];Emitted when the autoplay mode is enabled and no related song could be found.
pauseSong
Section titled “pauseSong”pauseSong: [queue: Queue, song: Song];Emitted when a guild stream is paused.
playSong
Section titled “playSong”playSong: [queue: Queue, song: Song];Emitted when a song starts playing.
preloadedSong
Section titled “preloadedSong”preloadedSong: [queue: Queue, song: Song];Emitted when the next song in a Queue has been pre-buffered and is ready.
preloadError
Section titled “preloadError”preloadError: [queue: Queue, song: Song, error: Error];Emitted when pre-buffering the next song in a Queue fails.
preloadSong
Section titled “preloadSong”preloadSong: [queue: Queue, song: Song];Emitted when DisTube starts pre-buffering / pre-fetching the next song in a Queue.
resumeSong
Section titled “resumeSong”resumeSong: [queue: Queue, song: Song];Emitted when a paused guild stream is resumed.
seekSong
Section titled “seekSong”seekSong: [queue: Queue, song: Song, position: number];Emitted when a guild stream is seeked to a new position.
setVolume
Section titled “setVolume”setVolume: [queue: Queue, volume: number, oldVolume: number];Emitted when the volume of a guild stream is changed.
shuffleQueue
Section titled “shuffleQueue”shuffleQueue: [queue: Queue, songs: Song[]];Emitted after the songs of a Queue have been shuffled.
skipSong
Section titled “skipSong”skipSong: [queue: Queue, song: Song];Emitted when a song is skipped.
voiceChannelChange
Section titled “voiceChannelChange”voiceChannelChange: [queue: Queue, oldChannel: VoiceBasedChannel, newChannel: VoiceBasedChannel];Emitted when the bot is moved to another voice channel.