跳至主要内容
版本:v1.1.1

Filters

Table of contents

Constructors

Accessors

Methods

Constructors

constructor

new Filters(player)

Creates an instance of filters

Parameters

NameType
playerPlayer

Defined in

lib/Filters.ts:24

Accessors

active

get active(): FilterOptions

Gets a copy of active filters object

Returns

FilterOptions

Defined in

lib/Filters.ts:35


enabled

get enabled(): boolean

Checks if some filter is enabled

Returns

boolean

Defined in

lib/Filters.ts:30

Methods

apply

apply(): void

Sends filters payload to Lavalink Node

Returns

void

Defined in

lib/Filters.ts:245


clear

clear(): void

Clears all active filters

Returns

void

Defined in

lib/Filters.ts:238


set

set(filters): void

Sets all filters

Parameters

NameType
filtersFilterOptions

Returns

void

Defined in

lib/Filters.ts:224


setChannelMix

setChannelMix(options, apply?): Filters

Sets ChannelMix filter

Parameters

NameTypeDefault valueDescription
optionsnull | ChannelMixOptionsundefinedThe channel mix options
applybooleantrueWhether to send filter payload to Lavalink or not

Returns

Filters

The filters instance, for chaining calls

Defined in

lib/Filters.ts:49


setDistortion

setDistortion(options, apply?): Filters

Sets Distortion filter

Parameters

NameTypeDefault valueDescription
optionsnull | DistortionOptionsundefinedThe distortion options
applybooleantrueWhether to send filter payload to Lavalink or not

Returns

Filters

The filters instance, for chaining calls

Defined in

lib/Filters.ts:72


setEqualizer

setEqualizer(options, apply?): Filters

Sets Equalizer filter

Parameters

NameTypeDefault valueDescription
optionsnull | number[]undefinedThe equalizer band array
applybooleantrueWhether to send filter payload to Lavalink or not

Returns

Filters

The filters instance, for chaining calls

Defined in

lib/Filters.ts:87


setKaraoke

setKaraoke(options, apply?): Filters

Sets Karaoke filter

Parameters

NameTypeDefault valueDescription
optionsnull | KaraokeOptionsundefinedThe karaoke options
applybooleantrueWhether to send filter payload to Lavalink or not

Returns

Filters

The filters instance, for chaining calls

Defined in

lib/Filters.ts:113


setLowPass

setLowPass(options, apply?): Filters

Sets LowPass filter

Parameters

NameTypeDefault valueDescription
optionsnull | LowPassOptionsundefinedThe lowpass options
applybooleantrueWhether to send filter payload to Lavalink or not

Returns

Filters

The filters instance, for chaining calls

Defined in

lib/Filters.ts:129


setRotation

setRotation(options, apply?): Filters

Sets Rotation filter

Parameters

NameTypeDefault valueDescription
optionsnull | RotationOptionsundefinedThe rotation options
applybooleantrueWhether to send filter payload to Lavalink or not

Returns

Filters

The filters instance, for chaining calls

Defined in

lib/Filters.ts:145


setTimescale

setTimescale(options, apply?): Filters

Sets Timescale filter

Parameters

NameTypeDefault valueDescription
optionsnull | TimescaleOptionsundefinedThe timescale options
applybooleantrueWhether to send filter payload to Lavalink or not

Returns

Filters

The filters instance, for chaining calls

Defined in

lib/Filters.ts:163


setTremolo

setTremolo(options, apply?): Filters

Sets Tremolo filter

Parameters

NameTypeDefault valueDescription
optionsnull | TremoloOptionsundefinedThe tremolo options
applybooleantrueWhether to send filter payload to Lavalink or not

Returns

Filters

The filters instance, for chaining calls

Defined in

lib/Filters.ts:180


setVibrato

setVibrato(options, apply?): Filters

Sets Vibrato filter

Parameters

NameTypeDefault valueDescription
optionsnull | VibratoOptionsundefinedThe vibrato options
applybooleantrueWhether to send filter payload to Lavalink or not

Returns

Filters

The filters instance, for chaining calls

Defined in

lib/Filters.ts:197


setVolume

setVolume(vol, apply?): Filters

Sets the volume

Parameters

NameTypeDefault valueDescription
volnumberundefinedThe volume to set [0,500]
applybooleantrueWhether to send filter payload to Lavalink or not

Returns

Filters

The filters instance, for chaining calls

Defined in

lib/Filters.ts:212