Options
All
  • Public
  • Public/Protected
  • All
Menu

Class QueueManager<TM, M>

The manager of queue handler

Example:

import { QueueManager, CacheManagerImpl, youtubeMetadata, soundcloudMetadata } from "discord-media-player"
const manager = new QueueManager<youtubeMetadata | soundcloudMetadata>({
  //cache is optional
  cache: new CacheManagerImpl()
})
...

Type parameters

  • TM: object = {}

  • M = unknown

Hierarchy

Index

Constructors

constructor

Events

Static AUDIO_END

AUDIO_END: string = "audioEnd"

Emitted whenever an audio is ended after playing

Listener must implement AudioEndCallback

Static AUDIO_ERROR

AUDIO_ERROR: string = "audioError"

Emitted whenever an error is thrown while getting audio source before playing

Listener must implement AudioErrorCallback

Static AUDIO_START

AUDIO_START: string = "audioStart"

Emitted whenever an audio is started playing

Listener must implement AudioStartCallback

Static QUEUE_END

QUEUE_END: string = "queueEnd"

Emitted whenever a queue is ended

Listener must implement QueueEndCallback

Static QUEUE_START

QUEUE_START: string = "queueStart"

Emitted whenever a queue is starting to play audio

Listener must implement QueueStartCallback

Properties

Readonly audioManager

audioManager: AudioManager

The audio manager of the queue

Optional Readonly metadata

metadata: M

The queue manager metadata (if any)

Methods

deleteHandler

  • deleteHandler(connection: VoiceConnection): boolean
  • Delete queue handler from list

    Parameters

    • connection: VoiceConnection

      The voice connection

    Returns boolean

    false if failed or doesn't exist, true if deleted

getHandler

soundcloudSearch

youtubeSearch

Generated using TypeDoc