Skip to content

BaseManager

Manages the collection of a data model.

V

new BaseManager<V>(distube): BaseManager<V>;

Create a new base object.

DisTube

The DisTube instance

BaseManager<V>

DisTubeBase.constructor

collection: Collection<string, V>;

The collection of items for this manager.


distube: DisTube;

The DisTube instance this object belongs to.

DisTubeBase.distube

get client(): Client;

Discord.js client

Client

DisTubeBase.client


get handler(): DisTubeHandler;

DisTube handler

DisTubeHandler

DisTubeBase.handler


get options(): Options;

DisTube options

Options

DisTubeBase.options


get plugins(): DisTubePlugin[];

DisTube plugins

DisTubePlugin[]

DisTubeBase.plugins


get queues(): QueueManager;

The queue manager

QueueManager

DisTubeBase.queues


get size(): number;

The size of the collection.

number


get voices(): DisTubeVoiceManager;

The voice manager

DisTubeVoiceManager

DisTubeBase.voices

debug(message): void;

Emit debug event

string

debug message

void

Nothing

DisTubeBase.debug


emit(eventName, ...args): boolean;

Emit the DisTube of this base

keyof DisTubeEvents

Event name

…any

arguments

boolean

true when the event had listeners, false otherwise

DisTubeBase.emit


emitError(
error,
queue,
song?
): void;

Emit error event

Error

error

Queue

The queue encountered the error

Song<unknown>

The playing song when encountered the error

void

Nothing

DisTubeBase.emitError