Discolink
    Preparing search index...

    Class Player<Context, Plugins>

    The main class, entrypoint of the library

    Type Parameters

    Hierarchy

    Index

    Constructors

    Properties

    Manager responsible for handling nodes

    voices: VoiceManager

    Manager responsible for handling voice connections

    Manager responsible for handling queues

    options: RequiredProp<
        Omit<PlayerOptions<Plugins>, "plugins">,
        "queryPrefix" | "relocateQueues" | "fetchRelatedTracks",
    >

    Resolved options this player was constructed with

    Plugins extracted from options, mapped by their names (if any)

    Accessors

    • get clientId(): string | null

      Id of the bot this player has been initialized for

      Returns string | null

    Methods

    • Creates nodes, initializes plugins, connects to all nodes sequentially

      Parameters

      • clientId: string

        Id of your bot

      Returns Promise<void>

    • Destroys the queue of a guild

      Parameters

      • guildId: string

        Id of the guild

      • Optionalreason: string

        Reason for destroying

      Returns Promise<void>

    • Seeks to a position in the current track of a guild

      Parameters

      • guildId: string

        Id of the guild

      • ms: number

        Position in milliseconds

      Returns Promise<number>

    • Enables or disables autoplay for the queue of a guild

      Parameters

      • guildId: string

        Id of the guild

      • Optionalautoplay: boolean

        Whether to enable autoplay

      Returns boolean

    • Sets the volume of the queue of a guild

      Parameters

      • guildId: string

        Id of the guild

      • volume: number

        The volume to set

      Returns Promise<number>

    • Shuffles tracks for the queue of a guild

      Parameters

      • guildId: string

        Id of the guild

      • OptionalincludePrevious: boolean

        Whether to pull previous tracks to current

      Returns Queue<Context>