跳至主要内容
版本:v2.1.0

Filters

Table of contents

Constructors

Accessors

Methods

Constructors

constructor

new Filters(player)

創建一個 Filters 實例

Parameters

NameType
playerPlayer

Defined in

lib/Filters.ts:25

Accessors

active

get active(): FilterOptions

獲取活動 Filters 物件的副本

Returns

FilterOptions

Defined in

lib/Filters.ts:36


enabled

get enabled(): boolean

檢查某個 Filters 是否已啟用

Returns

boolean

Defined in

lib/Filters.ts:31

Methods

apply

apply(): void

將 Filters 設置傳送到 Lavalink 節點

Returns

void

Defined in

lib/Filters.ts:245


clear

clear(): void

清除所有活動的 Filters

Returns

void

Defined in

lib/Filters.ts:238


set

set(filters): void

設置所有 Filters

Parameters

NameType
filtersFilterOptions

Returns

void

Defined in

lib/Filters.ts:224


setChannelMix

setChannelMix(options, apply?): Filters

設置 ChannelMix Filter

Parameters

NameTypeDefault valueDescription
optionsnull | ChannelMixOptionsundefinedchannel mix 選項
applybooleantrue是否將 Filter 設置傳送到 Lavalink 節點

Returns

Filters

Filter 實例,用於鏈式呼叫

Defined in

lib/Filters.ts:50


setDistortion

setDistortion(options, apply?): Filters

設置 Distortion Filter

Parameters

NameTypeDefault valueDescription
optionsnull | DistortionOptionsundefineddistortion 選項
applybooleantrue是否將 Filter 設置傳送到 Lavalink 節點

Returns

Filters

Filter 實例,用於鏈式呼叫

Defined in

lib/Filters.ts:73


setEqualizer

setEqualizer(options, apply?): Filters

設置 Equalizer Filter

Parameters

NameTypeDefault valueDescription
optionsnull | number[]undefined等化器陣列
applybooleantrue是否將 Filter 設置傳送到 Lavalink 節點

Returns

Filters

Filter 實例,用於鏈式呼叫

Defined in

lib/Filters.ts:88


setKaraoke

setKaraoke(options, apply?): Filters

設置 Karaoke Filter

Parameters

NameTypeDefault valueDescription
optionsnull | KaraokeOptionsundefinedkaraoke 選項
applybooleantrue是否將 Filter 設置傳送到 Lavalink 節點

Returns

Filters

Filter 實例,用於鏈式呼叫

Defined in

lib/Filters.ts:114


setLowPass

setLowPass(options, apply?): Filters

設置 LowPass Filter

Parameters

NameTypeDefault valueDescription
optionsnull | LowPassOptionsundefinedlowpass 選項
applybooleantrue是否將 Filter 設置傳送到 Lavalink 節點

Returns

Filters

Filter 實例,用於鏈式呼叫

Defined in

lib/Filters.ts:130


setRotation

setRotation(options, apply?): Filters

設置 Rotation Filter

Parameters

NameTypeDefault valueDescription
optionsnull | RotationOptionsundefinedrotation 選項
applybooleantrue是否將 Filter 設置傳送到 Lavalink 節點

Returns

Filters

Filter 實例,用於鏈式呼叫

Defined in

lib/Filters.ts:146


setTimescale

setTimescale(options, apply?): Filters

設置 Timescale Filter

Parameters

NameTypeDefault valueDescription
optionsnull | TimescaleOptionsundefinedtimescale 選項
applybooleantrue是否將 Filter 設置傳送到 Lavalink 節點

Returns

Filters

Filter 實例,用於鏈式呼叫

Defined in

lib/Filters.ts:164


setTremolo

setTremolo(options, apply?): Filters

設置 Tremolo filter

Parameters

NameTypeDefault valueDescription
optionsnull | TremoloOptionsundefinedtremolo 選項
applybooleantrue是否將 Filter 設置傳送到 Lavalink 節點

Returns

Filters

Filter 實例,用於鏈式呼叫

Defined in

lib/Filters.ts:181


setVibrato

setVibrato(options, apply?): Filters

設置 Vibrato filter

Parameters

NameTypeDefault valueDescription
optionsnull | VibratoOptionsundefinedvibrato 選項
applybooleantrue是否將 Filter 設置傳送到 Lavalink 節點

Returns

Filters

Filter 實例,用於鏈式呼叫

Defined in

lib/Filters.ts:198


setVolume

setVolume(vol, apply?): Filters

設置音量

Parameters

NameTypeDefault valueDescription
volnumberundefined要設置的音量 [0,500]
applybooleantrue是否將 Filter 設置傳送到 Lavalink 節點

Returns

Filters

Filter 實例,用於鏈式呼叫

Defined in

lib/Filters.ts:213