DisTubeOptions: {
    customFilters?: Filters;
    directLink?: boolean;
    emitAddListWhenCreatingQueue?: boolean;
    emitAddSongWhenCreatingQueue?: boolean;
    emitNewSongOnly?: boolean;
    emptyCooldown?: number;
    ffmpeg?: {
        args?: {
            global?: FFmpegArgs;
            input?: FFmpegArgs;
            output?: FFmpegArgs;
        };
        path?: string;
    };
    ffmpegDefaultArgs?: FFmpegArgs;
    ffmpegPath?: string;
    joinNewVoiceChannel?: boolean;
    leaveOnEmpty?: boolean;
    leaveOnFinish?: boolean;
    leaveOnStop?: boolean;
    nsfw?: boolean;
    plugins?: (CustomPlugin | ExtractorPlugin)[];
    savePreviousSongs?: boolean;
    searchCooldown?: number;
    searchSongs?: number;
    streamType?: StreamType;
    youtubeCookie?: Cookie[] | string;
    ytdlOptions?: ytdl.downloadOptions;
}

DisTube options

Type declaration

  • Optional customFilters?: Filters

    Override defaultFilters or add more ffmpeg filters

  • Optional directLink?: boolean

    Whether or not playing a song with direct link

  • Optional emitAddListWhenCreatingQueue?: boolean

    Whether or not emitting addList event when creating a new Queue

  • Optional emitAddSongWhenCreatingQueue?: boolean

    Whether or not emitting addSong event when creating a new Queue

  • Optional emitNewSongOnly?: boolean

    Whether or not emitting DisTube#playSong event when looping a song or next song is the same as the previous one

  • Optional emptyCooldown?: number

    Built-in leave on empty cooldown in seconds (When leaveOnEmpty is true)

  • Optional ffmpeg?: {
        args?: {
            global?: FFmpegArgs;
            input?: FFmpegArgs;
            output?: FFmpegArgs;
        };
        path?: string;
    }

    FFmpeg options

  • Optional ffmpegDefaultArgs?: FFmpegArgs

    FFmpeg default arguments

    Deprecated

  • Optional ffmpegPath?: string

    FFmpeg path

    Deprecated

  • Optional joinNewVoiceChannel?: boolean

    Whether or not joining the new voice channel when using DisTube#play method

  • Optional leaveOnEmpty?: boolean

    Whether or not leaving voice channel if the voice channel is empty after DisTubeOptions.emptyCooldown seconds

  • Optional leaveOnFinish?: boolean

    Whether or not leaving voice channel when the queue ends

  • Optional leaveOnStop?: boolean

    Whether or not leaving voice channel after using DisTube#stop function

  • Optional nsfw?: boolean

    Whether or not playing age-restricted content and disabling safe search in non-NSFW channel

  • Optional plugins?: (CustomPlugin | ExtractorPlugin)[]

    DisTube plugins

  • Optional savePreviousSongs?: boolean

    Whether or not saving the previous songs of the queue and enable DisTube#previous method

  • Optional searchCooldown?: number

    Built-in search cooldown in seconds (When searchSongs is bigger than 0)

  • Optional searchSongs?: number

    Limit of search results emits in DisTube#searchResult event when DisTube#play method executed. If searchSongs <= 1, play the first result

  • Optional streamType?: StreamType

    Decide the DisTubeStream#type will be used (Not the same as DisTubeStream#type)

  • Optional youtubeCookie?: Cookie[] | string

    YouTube cookies. Guide: YouTube Cookies

  • Optional ytdlOptions?: ytdl.downloadOptions

    ytdl-core get info options