Shoukaku
    Preparing search index...

    Class Node

    Represents a Lavalink node

    Index

    Constructors

    • Parameters

      • manager: Shoukaku

        Shoukaku instance

      • options: NodeOption

        Options on creating this node

        • auth: string

          Credentials to access Lavalink

        • Optionalgroup?: string

          Name of the Lavalink node group

        • name: string

          Name of the Lavalink node

        • Optionalsecure?: boolean

          Whether to use secure protocols or not

        • url: string

          Lavalink node host and port without any prefix

      Returns Node

    Properties

    connections: WeakSet<Connection>

    Connections that are referenced by this node

    group?: string

    Group in which this node is contained

    info: null | NodeInfo

    Information about lavalink node

    manager: Shoukaku

    Shoukaku class

    name: string

    Name of this node

    reconnects: number

    The number of reconnects to Lavalink

    rest: Rest

    Lavalink rest API

    sessionId: null | string

    SessionId of this Lavalink connection (not to be confused with Discord SessionId)

    The state of this connection

    stats: null | Stats

    Statistics from Lavalink

    Accessors

    • get mappedConnections(): Connection[]
      Internal

      Node connections, this exists because weaksets can't be iterated on

      Returns Connection[]

      An array of connections being referenced by this node

    • get penalties(): number

      Penalties for load balancing

      Returns number

      Penalty score

    Methods

    • Internal

      Connect to Lavalink

      Returns Promise<void>

    • Internal

      Disconnect from Lavalink

      Parameters

      • code: number

        Status code

      • Optionalreason: string

        Reason for disconnect

      Returns void