Lavacord
    Preparing search index...

    Interface LavalinkNodeOptions

    Defines the options for configuring a LavalinkNode.

    These options specify how to connect to a Lavalink server and how the node should behave.

    interface LavalinkNodeOptions {
        host: string;
        id: string;
        password?: string;
        port?: string | number;
        reconnectInterval?: number;
        resumeTimeout?: number;
        resuming?: boolean;
        secure?: boolean;
        sessionId?: string;
        state?: unknown;
    }
    Index

    Properties

    host: string

    The hostname or IP address of the Lavalink server.

    "localhost"
    
    id: string

    A unique identifier for this LavalinkNode, used for organization.

    This ID is used internally by Lavacord to reference and manage nodes.

    password?: string

    The password for authenticating with the Lavalink server.

    "youshallnotpass"
    
    port?: string | number

    The port number of the Lavalink server.

    2333
    
    reconnectInterval?: number

    The interval (in milliseconds) at which the node will attempt to reconnect if the connection is lost.

    10000 (10 seconds)
    
    resumeTimeout?: number

    The timeout (in seconds) for resuming a session.

    120 (2 minutes)
    
    resuming?: boolean

    Whether the node should attempt to resume the session if a sessionId is present when the WebSocket connection opens or the node becomes ready.

    false
    
    secure?: boolean

    Whether to use secure connections (HTTPS/WSS) instead of HTTP/WS.

    When true, WebSocket connections will use WSS and REST requests will use HTTPS. This is required when connecting to Lavalink servers behind SSL/TLS.

    false
    
    sessionId?: string

    A previous session ID to attempt to resume a connection with the Lavalink server.

    This is used when attempting to resume a previous session after reconnection.

    state?: unknown

    Arbitrary state data that can be attached to the node for user-specific purposes.

    This data is not sent to Lavalink and is only used internally.