Skip to content

DisTubeBase

The base class of every DisTube internal that needs a reference to the DisTube instance.

new DisTubeBase(distube): DisTubeBase;

Create a new base object.

DisTube

The DisTube instance

DisTubeBase

distube: DisTube;

The DisTube instance this object belongs to.

get client(): Client;

Discord.js client

Client


get handler(): DisTubeHandler;

DisTube handler

DisTubeHandler


get options(): Options;

DisTube options

Options


get plugins(): DisTubePlugin[];

DisTube plugins

DisTubePlugin[]


get queues(): QueueManager;

The queue manager

QueueManager


get voices(): DisTubeVoiceManager;

The voice manager

DisTubeVoiceManager

debug(message): void;

Emit debug event

string

debug message

void

Nothing


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


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