Plugin filters should implement this interface to use with Player#setPluginFilter
Example with LavaDSPX high-pass filter
high-pass
export class LavaDSPXHighPass implements PluginFilter { public readonly pluginRequired = { name: 'lavadspx-plugin', version: '^0.0.5' }; public readonly name = 'high-pass'; public readonly T = t<{ cutoffFrequency: number; boostFactor: number; }>; } Copy
export class LavaDSPXHighPass implements PluginFilter { public readonly pluginRequired = { name: 'lavadspx-plugin', version: '^0.0.5' }; public readonly name = 'high-pass'; public readonly T = t<{ cutoffFrequency: number; boostFactor: number; }>; }
Readonly
Name of filter
Optional
Plugin required by filter
This hack is to work around TypeScript types not existing at runtime. We can specify the return type here.
This function is never actually called, so the implementation can be simply:
T = (response: unknown) => response as LavalinkResponse; Copy
T = (response: unknown) => response as LavalinkResponse;
Or using the t utility function
t
import { t } from 'shoukaku';T = t<LavalinkResponse>; Copy
import { t } from 'shoukaku';T = t<LavalinkResponse>;
Plugin filters should implement this interface to use with Player#setPluginFilter
Example
Example with LavaDSPX
high-passfilter