Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

currentVoiceChannel

currentVoiceChannel: null | string = null

The player's current voice channel.

filters

filters: Filters = {}

The player's filters.

see

Lavalink Docs

isSpeaker

isSpeaker: null | boolean = null

If the player is a speaker. This is null if the player isn't connected, if the becomeSpeaker option is false, or if the channel is not a stage channel. This is initially set when running Player#connect().

isStage

isStage: null | boolean = null

If the voice channel is a stage. This is set when running Player#connect().

loop

loop: LoopType = 'off'

The queue's loop behavior.

manager

node

node: Node

Readonly options

The player's options.

position

position: null | number = null

The position in the track playing, in milliseconds. This is null if no track is playing.

queue

queue: (Track | TrackPartial)[] = []

The queue.

queuePosition

queuePosition: null | number = null

The current song playing, represented as an index of Player#queue. This is null if there isn't a song currently playing.

state

state: PlayerState = ...

The player's state.

volume

volume: number = 100

The player's volume.

Accessors

currentTrack

paused

  • get paused(): boolean

playing

  • get playing(): boolean

Methods

clear

  • clear(stop?: boolean): Promise<void>
  • Clear the queue.

    Parameters

    • stop: boolean = false

      If true, if a track is currently playing it will be stopped and removed from the queue. If false, if a track is playing it will be preserved. Defaults to false.

    Returns Promise<void>

connect

  • connect(): Promise<void>
  • Connect to a voice channel. The player must be in a disconnected state.

    Returns Promise<void>

destroy

  • destroy(reason?: string): void
  • Destroy the player.

    Parameters

    • reason: string = 'Manual destroy'

      The reason the player was destroyed.

    Returns void

pause

  • pause(reason?: string): Promise<void>

play

  • Queue and play a track or tracks. If a track is already playing, the specified track(s) will only be pushed to the queue.

    Parameters

    Returns Promise<void>

    The track played.

remove

  • Remove a track from the queue.

    Parameters

    • index: number

      The index of the track to remove.

    • advanceQueue: boolean = true

      If the queue should advance if the removed track is the current track playing. If false, the player will be stopped. Defaults to true.

    Returns Promise<Track | TrackPartial>

    The removed track.

resume

  • resume(reason?: string): Promise<void>

seek

  • seek(position: number): Promise<void>
  • Seek to a desired position.

    Parameters

    • position: number

      The position in the track to seek to, in milliseconds.

    Returns Promise<void>

setFilters

  • setFilters(filters: Filters): Promise<void>

setLoop

setVolume

  • setVolume(volume: number): Promise<void>
  • Set the player's volume.

    Parameters

    • volume: number

      The volume to set the player to.

    Returns Promise<void>

shuffle

  • shuffle(): Promise<void>

skip

  • skip(index?: number): Promise<void>
  • Skip to the next track based on the player's loop behavior, or to a specified index of the queue.

    Parameters

    • Optional index: number

      The index to skip to.

    Returns Promise<void>

stop

  • stop(): Promise<void>

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method

Generated using TypeDoc