Shoukaku
    Preparing search index...

    Interface PluginFilter

    Plugin filters should implement this interface to use with Player#setPluginFilter

    Example with LavaDSPX high-pass filter

    	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;
    }>;
    }
    interface PluginFilter {
        name: string;
        pluginRequired?: PluginRequirement;
        T: TFn;
    }

    Hierarchy (View Summary)

    Index

    Properties

    name: string

    Name of filter

    pluginRequired?: PluginRequirement

    Plugin required by filter

    T: TFn

    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;
    

    Or using the t utility function

    import { t } from 'shoukaku';

    T = t<LavalinkResponse>;