Discolink
    Preparing search index...

    Class Node

    A class representing a lavalink server

    Hierarchy

    Index

    Constructors

    Properties

    name: string
    rest: REST

    Accessors

    • get sessionId(): string | null

      Id of the session

      Returns string | null

    • get ready(): boolean

      The node has connected and received the ready payload

      Returns boolean

    • get disconnected(): boolean

      The node is disconnected (no connection, no reconnects)

      Returns boolean

    • get reconnectAttempts(): number

      Number of reconnects attempted

      Returns number

    • get handshakeTimeout(): number

      Initial handshake timeout in milliseconds

      Returns number

    • set handshakeTimeout(ms: number): void

      Parameters

      • ms: number

      Returns void

    Methods

    • Connects for a session with lavalink

      Returns Promise<boolean>

      true if the initial handshake succeeded, false otherwise

    • Closes connection to lavalink and stops reconnecting

      Parameters

      • reason: string = "disconnected"

        Reason for closing (only effective if a connection exists)

      Returns Promise<void>

    • Returns a string representation of an object.

      Returns string