Options
The validated options of a DisTube instance.
Every option has a default value, and every option is validated when the instance is created.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Options(options): Options;Create the options of a DisTube instance.
Parameters
Section titled “Parameters”options
Section titled “options”The options given by the user
Returns
Section titled “Returns”Options
Throws
Section titled “Throws”DisTubeError When an option has an invalid type, or when it is not a known option
Properties
Section titled “Properties”autoplayAttempts
Section titled “autoplayAttempts”autoplayAttempts: number;The number of times in a row that autoplay items may fail before autoplay gives up.
Default
Section titled “Default”3crossfade
Section titled “crossfade”crossfade: CrossfadeOptions;The crossfade options of the DisTube instance.
Default
Section titled “Default”{ duration: 0, curve: "qsin", warmup: 5 }customFilters?
Section titled “customFilters?”customFilters?: Filters;The custom FFmpeg audio filters, that override the defaultFilters.
emitAddListWhenCreatingQueue
Section titled “emitAddListWhenCreatingQueue”emitAddListWhenCreatingQueue: boolean;Whether or not the Events.ADD_LIST event is emitted when a new Queue is created.
Default
Section titled “Default”trueemitAddSongWhenCreatingQueue
Section titled “emitAddSongWhenCreatingQueue”emitAddSongWhenCreatingQueue: boolean;Whether or not the Events.ADD_SONG event is emitted when a new Queue is created.
Default
Section titled “Default”trueemitNewSongOnly
Section titled “emitNewSongOnly”emitNewSongOnly: boolean;Whether or not the Events.PLAY_SONG event is emitted when looping a song or when the next song is the same as the previous one.
Default
Section titled “Default”falseffmpeg
Section titled “ffmpeg”ffmpeg: FFmpegOptions;The FFmpeg options of the DisTube instance.
joinNewVoiceChannel
Section titled “joinNewVoiceChannel”joinNewVoiceChannel: boolean;Whether or not the bot joins the new voice channel when DisTube#play is used.
Default
Section titled “Default”truensfw: boolean;Whether or not age-restricted content can be played in a non-NSFW channel.
Default
Section titled “Default”falseplugins
Section titled “plugins”plugins: DisTubePlugin[];The plugins of the DisTube instance.
preload
Section titled “preload”preload: PreloadOptions;The preload options of the DisTube instance.
Default
Section titled “Default”{ enabled: false, threshold: 15 }savePreviousSongs
Section titled “savePreviousSongs”savePreviousSongs: boolean;Whether or not the previous songs of a Queue are saved.
Default
Section titled “Default”truestuckThreshold
Section titled “stuckThreshold”stuckThreshold: number;The time (in milliseconds) a track may stay in the “buffering” state before it is considered stuck and gets skipped.
Set to 0 to disable the stuck-track detection.
Default
Section titled “Default”10000unhandledError
Section titled “unhandledError”unhandledError: UnhandledErrorBehavior;The behavior of the Events.ERROR event when it has no listener.
Default
Section titled “Default”"log"