Discolink
    Preparing search index...

    Class Player<Context, Plugins>

    Main class putting together all essential managers, also the entry point to get you started

    Type Parameters

    Hierarchy

    Index
    voices: VoiceManager
    • Get the queue of a guild

      Parameters

      • guildId: string

        Id of the guild

      Returns Queue<Context> | undefined

    • Get the queue of a guild

      Parameters

      • guildId: string

        Id of the guild

      • error: true

        Whether to throw an error if no queue is found

      Returns Queue<Context>

    • Destroy the queue of a guild

      Parameters

      • guildId: string

        Id of the guild

      • Optionalreason: string

        Reason for destroying

      Returns Promise<void>

    • Pause the queue of a guild

      Parameters

      • guildId: string

        Id of the guild

      Returns Promise<boolean>

    • Resume the queue of a guild

      Parameters

      • guildId: string

        Id of the guild

      Returns Promise<boolean>

    • Seek to a specific position in the current track

      Parameters

      • guildId: string

        Id of the guild

      • ms: number

        Position in milliseconds

      Returns Promise<number>

    • Set autoplay of a queue

      Parameters

      • guildId: string

        Id of the guild

      • Optionalautoplay: boolean

        Whether to enable autoplay (false by default)

      Returns boolean

    • Set volume of a queue

      Parameters

      • guildId: string

        Id of the guild

      • volume: number

        Numeric value between 0 and 1000

      Returns Promise<number>

    • Shuffle tracks of a queue

      Parameters

      • guildId: string

        Id of the guild

      • OptionalincludePrevious: boolean

        Whether to move previous tracks to current

      Returns Queue<Context>

    • Fired when the player is initialized.

      Returns void

    • Fired when connection to a node succeeds.

      Parameters

      • node: Node
      • reconnects: number

      Returns void

    • Fired when a connected node signals ready.

      Parameters

      • node: Node
      • resumed: boolean
      • sessionId: string

      Returns void

    • Fired when connection to a node errors.

      Parameters

      Returns void

    • Fired when connection to a node closes and enters reconnecting.

      This event is skipped for nodeDisconnect in case of explicit disconnects or nodes with reconnections disabled.

      Parameters

      • node: Node
      • code: number
      • reason: string

      Returns void

    • Fired when a node is disconnected and no longer reconnecting.

      Parameters

      • node: Node
      • code: number
      • reason: string
      • byLocal: boolean

      Returns void

    • Fired when a new (or disconnected) VoiceState's node connects to a voice server.

      Parameters

      Returns void

    • Fired when the connection between a VoiceState's node and voice server closes.

      Depending on the close code and PlayerOptions.voiceReconnect, the VoiceState will attempt a reconnect.

      Parameters

      • voice: VoiceState
      • code: number
      • reason: string
      • byRemote: boolean

      Returns void

    • Fired when a VoiceState's node is changed.

      Parameters

      Returns void