🎛️Filters

Represents a filter structure for one Player

Adding a filter can have adverse effects on lavalink performance. These filters force Lavaplayer to decode all audio to PCM, even if the input was already in the Opus format that Discord uses. This means decoding and encoding audio that would normally require very little processing. This is often the case with YouTube videos.

Properties

NameDescriptionType

enabled

Checks if some filter is enabled

active

Gets a copy of active filters object

Methods

apply()

Sends the filter payload to Lavalink Node applying all active filters

clear()

Clears all active filters

set()

Sets the filters (this function will override all active filters)

PropertyDescription

options

setChannelMix()

Configs the channel mix filter

PropertyDescription

options

ChannelMixOptions | null The filter options, null to disable

apply

Boolean (optional) Whether to send filter payload to Lavalink or not, default is true. Set it to false if you set multiple filters at the same time

ReturnsDescription

This instance, for chaining calls

setDistortion()

Configs the distortion filter

PropertyDescription

options

DistortionOptions | null The filter options, null to disable

apply

Boolean (optional) Whether to send filter payload to Lavalink or not, default is true. Set it to false if you set multiple filters at the same time

ReturnsDescription

This instance, for chaining calls

setEqualizer()

Configs the equalizer filter. Learn more

PropertyDescription

options

Array<Number> | null An array of the band gains, null to disable

apply

Boolean (optional) Whether to send filter payload to Lavalink or not, default is true. Set it to false if you set multiple filters at the same time

ReturnsDescription

This instance, for chaining calls

setKaraoke()

Configs the karaoke filter

PropertyDescription

options

KaraokeOptions | null The filter options, null to disable

apply

Boolean (optional) Whether to send filter payload to Lavalink or not, default is true. Set it to false if you set multiple filters at the same time

ReturnsDescription

This instance, for chaining calls

setLowPass()

Configs the low pass filter

PropertyDescription

options

LowPassOptions | null The filter options, null to disable

apply

Boolean (optional) Whether to send filter payload to Lavalink or not, default is true. Set it to false if you set multiple filters at the same time

ReturnsDescription

This instance, for chaining calls

setRotation()

Configs the rotation filter

PropertyDescription

options

RotationOptions | null The filter options, null to disable

apply

Boolean (optional) Whether to send filter payload to Lavalink or not, default is true. Set it to false if you set multiple filters at the same time

ReturnsDescription

This instance, for chaining calls

setTimescale()

Configs the timescale filter

PropertyDescription

options

TimescaleOptions | null The filter options, null to disable

apply

Boolean (optional) Whether to send filter payload to Lavalink or not, default is true. Set it to false if you set multiple filters at the same time

ReturnsDescription

This instance, for chaining calls

setTremolo()

Configs the tremolo filter

PropertyDescription

options

TremoloOptions | null The filter options, null to disable

apply

Boolean (optional) Whether to send filter payload to Lavalink or not, default is true. Set it to false if you set multiple filters at the same time

ReturnsDescription

This instance, for chaining calls

setVolume()

PropertyDescription

volume

Number The volume between 0-500 Default is 100

apply

Boolean (optional) Whether to send filter payload to Lavalink or not, default is true. Set it to false if you set multiple filters at the same time

ReturnsDescription

This instance, for chaining calls

setVibrato()

Configs the vibrato filter

PropertyDescription

options

VibratoOptions | null The filter options, null to disable

apply

Boolean (optional) Whether to send filter payload to Lavalink or not, default is true. Set it to false if you set multiple filters at the same time

ReturnsDescription

This instance, for chaining calls

Last updated