Interface RainlinkAdditionalOptions

Some rainlink additional config option

interface RainlinkAdditionalOptions {
    additionalDriver?: Constructor<AbstractDriver>[];
    retryTimeout?: number;
    retryCount?: number;
    voiceConnectionTimeout?: number;
    defaultSearchEngine?: string;
    defaultVolume?: number;
    searchFallback?: {
        enable: boolean;
        engine: string;
    };
    resume?: boolean;
    resumeTimeout?: number;
    userAgent?: string;
    nodeResolver?: ((nodes: RainlinkNode[]) => Promise<undefined | RainlinkNode>);
    structures?: Structures;
}

Properties

additionalDriver?: Constructor<AbstractDriver>[]

Additional custom driver for rainlink (no need 'new' keyword when add). Example: additionalDriver: Lavalink4

retryTimeout?: number

Timeout before trying to reconnect (ms)

retryCount?: number

Number of times to try and reconnect to Lavalink before giving up

voiceConnectionTimeout?: number

The retry timeout for voice manager when dealing connection to discord voice server (ms)

defaultSearchEngine?: string

The default search engine like default search from youtube, spotify,...

defaultVolume?: number

The default volume when create a player

searchFallback?: {
    enable: boolean;
    engine: string;
}

Search track from youtube when track resolve failed

Type declaration

  • enable: boolean

    Whenever enable this search fallback or not

  • engine: string

    Choose a fallback search engine, recommended soundcloud and youtube

resume?: boolean

Whether to resume a connection on disconnect to Lavalink (Server Side) (Note: DOES NOT RESUME WHEN THE LAVALINK SERVER DIES)

resumeTimeout?: number

When the seasion is deleted from Lavalink. Use second (Server Side) (Note: DOES NOT RESUME WHEN THE LAVALINK SERVER DIES)

userAgent?: string

User Agent to use when making requests to Lavalink

nodeResolver?: ((nodes: RainlinkNode[]) => Promise<undefined | RainlinkNode>)

Node Resolver to use if you want to customize it

structures?: Structures

Custom structures for rainlink to use