FilterManager
Manage filters of a playing Queue
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new FilterManager(queue): FilterManager;Create a filter manager for a queue.
Parameters
Section titled “Parameters”The queue to manage
Returns
Section titled “Returns”FilterManager
Overrides
Section titled “Overrides”Properties
Section titled “Properties”collection
Section titled “collection”collection: Collection<string, Filter>;The collection of items for this manager.
Inherited from
Section titled “Inherited from”distube
Section titled “distube”distube: DisTube;The DisTube instance this object belongs to.
Inherited from
Section titled “Inherited from”queue: Queue;The queue to manage
Accessors
Section titled “Accessors”client
Section titled “client”Get Signature
Section titled “Get Signature”get client(): Client;Discord.js client
Returns
Section titled “Returns”Client
Inherited from
Section titled “Inherited from”ffmpegArgs
Section titled “ffmpegArgs”Get Signature
Section titled “Get Signature”get ffmpegArgs(): FFmpegArg;The FFmpeg arguments of the enabled filters.
It is the af output argument of the FFmpeg process.
Returns
Section titled “Returns”handler
Section titled “handler”Get Signature
Section titled “Get Signature”get handler(): DisTubeHandler;DisTube handler
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Get Signature
Section titled “Get Signature”get names(): string[];Array of enabled filter names
Returns
Section titled “Returns”string[]
options
Section titled “options”Get Signature
Section titled “Get Signature”get options(): Options;DisTube options
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”plugins
Section titled “plugins”Get Signature
Section titled “Get Signature”get plugins(): DisTubePlugin[];DisTube plugins
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”queues
Section titled “queues”Get Signature
Section titled “Get Signature”get queues(): QueueManager;The queue manager
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Get Signature
Section titled “Get Signature”get size(): number;The size of the collection.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”values
Section titled “values”Get Signature
Section titled “Get Signature”get values(): Filter[];Array of enabled filters
Returns
Section titled “Returns”Filter[]
voices
Section titled “voices”Get Signature
Section titled “Get Signature”get voices(): DisTubeVoiceManager;The voice manager
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”add(filterOrFilters, override?): FilterManager;Enable a filter or multiple filters to the manager
Parameters
Section titled “Parameters”filterOrFilters
Section titled “filterOrFilters”| FilterResolvable
| FilterResolvable[]
The filter or filters to enable
override?
Section titled “override?”boolean = false
Wether or not override the applied filter with new filter value
Returns
Section titled “Returns”FilterManager
This manager, to allow chaining
Throws
Section titled “Throws”DisTubeError When a filter is not a valid FilterResolvable
Example
Section titled “Example”queue.filters.add("bassboost");clear()
Section titled “clear()”clear(): FilterManager;Clear enabled filters of the manager
Returns
Section titled “Returns”FilterManager
This manager, to allow chaining
debug()
Section titled “debug()”debug(message): void;Emit debug event
Parameters
Section titled “Parameters”message
Section titled “message”string
debug message
Returns
Section titled “Returns”void
Nothing
Inherited from
Section titled “Inherited from”emit()
Section titled “emit()”emit(eventName, ...args): boolean;Emit the DisTube of this base
Parameters
Section titled “Parameters”eventName
Section titled “eventName”keyof DisTubeEvents
Event name
…any
arguments
Returns
Section titled “Returns”boolean
true when the event had listeners, false otherwise
Inherited from
Section titled “Inherited from”emitError()
Section titled “emitError()”emitError( error, queue, song?): void;Emit error event
Parameters
Section titled “Parameters”Error
error
The queue encountered the error
Song<unknown>
The playing song when encountered the error
Returns
Section titled “Returns”void
Nothing
Inherited from
Section titled “Inherited from”has(filter): boolean;Check whether a filter enabled or not
Parameters
Section titled “Parameters”filter
Section titled “filter”The filter to check
Returns
Section titled “Returns”boolean
true when the filter is enabled
Throws
Section titled “Throws”DisTubeError When the filter is not a valid FilterResolvable
remove()
Section titled “remove()”remove(filterOrFilters): FilterManager;Disable a filter or multiple filters
Parameters
Section titled “Parameters”filterOrFilters
Section titled “filterOrFilters”| FilterResolvable
| FilterResolvable[]
The filter or filters to disable
Returns
Section titled “Returns”FilterManager
This manager, to allow chaining
Throws
Section titled “Throws”DisTubeError When a filter is not a valid FilterResolvable
set(filters): FilterManager;Set the filters applied to the manager
Parameters
Section titled “Parameters”filters
Section titled “filters”The filters to apply
Returns
Section titled “Returns”FilterManager
This manager, to allow chaining
Throws
Section titled “Throws”DisTubeError When the array is invalid, or when a filter is not a valid FilterResolvable
toString()
Section titled “toString()”toString(): string;The names of the enabled filters, as a comma separated string.
Returns
Section titled “Returns”string
The names of the enabled filters