lavalink-client 2.0.1 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -1
- package/dist/cjs/structures/Filters.d.ts +69 -43
- package/dist/cjs/structures/Filters.js +223 -63
- package/dist/cjs/structures/LavalinkManager.d.ts +1 -1
- package/dist/cjs/structures/LavalinkManagerStatics.d.ts +2 -2
- package/dist/cjs/structures/LavalinkManagerStatics.js +10 -0
- package/dist/cjs/structures/Node.js +12 -6
- package/dist/cjs/structures/Player.js +1 -0
- package/dist/cjs/structures/Utils.d.ts +3 -1
- package/dist/esm/structures/Filters.d.ts +69 -43
- package/dist/esm/structures/Filters.js +223 -63
- package/dist/esm/structures/LavalinkManager.d.ts +1 -1
- package/dist/esm/structures/LavalinkManagerStatics.d.ts +2 -2
- package/dist/esm/structures/LavalinkManagerStatics.js +10 -0
- package/dist/esm/structures/Node.js +12 -6
- package/dist/esm/structures/Player.js +1 -0
- package/dist/esm/structures/Utils.d.ts +3 -1
- package/dist/types/structures/Filters.d.ts +69 -43
- package/dist/types/structures/LavalinkManager.d.ts +1 -1
- package/dist/types/structures/LavalinkManagerStatics.d.ts +2 -2
- package/dist/types/structures/Utils.d.ts +3 -1
- package/package.json +1 -1
|
@@ -86,20 +86,28 @@ export declare class FilterManager {
|
|
|
86
86
|
* @returns
|
|
87
87
|
*/
|
|
88
88
|
toggleLowPass(smoothing?: number): Promise<boolean>;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
89
|
+
lavalinkLavaDspxPlugin: {
|
|
90
|
+
toggleLowPass: (boostFactor?: number, cutoffFrequency?: number) => Promise<boolean>;
|
|
91
|
+
toggleHighPass: (boostFactor?: number, cutoffFrequency?: number) => Promise<boolean>;
|
|
92
|
+
toggleNormalization: (maxAmplitude?: number, adaptive?: boolean) => Promise<boolean>;
|
|
93
|
+
toggleEcho: (decay?: number, echoLength?: number) => Promise<boolean>;
|
|
94
|
+
};
|
|
95
|
+
lavalinkFilterPlugin: {
|
|
96
|
+
/**
|
|
97
|
+
* Enabels / Disables the Echo effect, IMPORTANT! Only works with the correct Lavalink Plugin installed. (Optional: provide your Own Data)
|
|
98
|
+
* @param delay
|
|
99
|
+
* @param decay
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
102
|
+
toggleEcho: (delay?: number, decay?: number) => Promise<boolean>;
|
|
103
|
+
/**
|
|
104
|
+
* Enabels / Disables the Echo effect, IMPORTANT! Only works with the correct Lavalink Plugin installed. (Optional: provide your Own Data)
|
|
105
|
+
* @param delays
|
|
106
|
+
* @param gains
|
|
107
|
+
* @returns
|
|
108
|
+
*/
|
|
109
|
+
toggleReverb: (delays?: number[], gains?: number[]) => Promise<boolean>;
|
|
110
|
+
};
|
|
103
111
|
/**
|
|
104
112
|
* Enables / Disabels a Nightcore-like filter Effect. Disables/Overwrides both: custom and Vaporwave Filter
|
|
105
113
|
* @param speed
|
|
@@ -160,10 +168,23 @@ export interface PlayerFilters {
|
|
|
160
168
|
audioOutput: AudioOutputs;
|
|
161
169
|
/** Lavalink Volume FILTER (not player Volume, think of it as a gain booster) */
|
|
162
170
|
volume: boolean;
|
|
163
|
-
/**
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
171
|
+
/** Filters for the Lavalink Filter Plugin */
|
|
172
|
+
lavalinkFilterPlugin: {
|
|
173
|
+
/** if echo filter is enabled / not */
|
|
174
|
+
echo: boolean;
|
|
175
|
+
/** if reverb filter is enabled / not */
|
|
176
|
+
reverb: boolean;
|
|
177
|
+
};
|
|
178
|
+
lavalinkLavaDspxPlugin: {
|
|
179
|
+
/** if lowPass filter is enabled / not */
|
|
180
|
+
lowPass: boolean;
|
|
181
|
+
/** if highPass filter is enabled / not */
|
|
182
|
+
highPass: boolean;
|
|
183
|
+
/** if normalization filter is enabled / not */
|
|
184
|
+
normalization: boolean;
|
|
185
|
+
/** if echo filter is enabled / not */
|
|
186
|
+
echo: boolean;
|
|
187
|
+
};
|
|
167
188
|
}
|
|
168
189
|
/**
|
|
169
190
|
* There are 15 bands (0-14) that can be changed.
|
|
@@ -174,9 +195,9 @@ export interface PlayerFilters {
|
|
|
174
195
|
*/
|
|
175
196
|
export interface EQBand {
|
|
176
197
|
/** On what band position (0-14) it should work */
|
|
177
|
-
band: IntegerNumber;
|
|
198
|
+
band: IntegerNumber | number;
|
|
178
199
|
/** The gain (-0.25 to 1.0) */
|
|
179
|
-
gain: FloatNumber;
|
|
200
|
+
gain: FloatNumber | number;
|
|
180
201
|
}
|
|
181
202
|
/**
|
|
182
203
|
* Uses equalization to eliminate part of a band, usually targeting vocals.
|
|
@@ -265,20 +286,6 @@ export interface LowPassFilter {
|
|
|
265
286
|
/** The smoothing factor (1.0 < x) */
|
|
266
287
|
smoothing?: number;
|
|
267
288
|
}
|
|
268
|
-
/**
|
|
269
|
-
* A Plugin Filter
|
|
270
|
-
*/
|
|
271
|
-
export interface EchoFilter {
|
|
272
|
-
delay: number;
|
|
273
|
-
decay: number;
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* A Plugin Filter
|
|
277
|
-
*/
|
|
278
|
-
export interface ReverbFilter {
|
|
279
|
-
delays: number[];
|
|
280
|
-
gains: number[];
|
|
281
|
-
}
|
|
282
289
|
/**
|
|
283
290
|
* Filter Data stored in the Client and partially sent to Lavalink
|
|
284
291
|
*/
|
|
@@ -292,15 +299,34 @@ export interface FilterData {
|
|
|
292
299
|
distortion?: DistortionFilter;
|
|
293
300
|
channelMix?: ChannelMixFilter;
|
|
294
301
|
lowPass?: LowPassFilter;
|
|
295
|
-
pluginFilters?:
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
302
|
+
pluginFilters?: {
|
|
303
|
+
"lavalink-filter-plugin"?: {
|
|
304
|
+
"echo"?: {
|
|
305
|
+
delay?: number;
|
|
306
|
+
decay?: number;
|
|
307
|
+
};
|
|
308
|
+
"reverb"?: {
|
|
309
|
+
delays?: number[];
|
|
310
|
+
gains?: number[];
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
"high-pass"?: {
|
|
314
|
+
cutoffFrequency?: number;
|
|
315
|
+
boostFactor?: number;
|
|
316
|
+
};
|
|
317
|
+
"low-pass"?: {
|
|
318
|
+
cutoffFrequency?: number;
|
|
319
|
+
boostFactor?: number;
|
|
320
|
+
};
|
|
321
|
+
normalization?: {
|
|
322
|
+
maxAmplitude?: number;
|
|
323
|
+
adaptive?: boolean;
|
|
324
|
+
};
|
|
325
|
+
echo?: {
|
|
326
|
+
echoLength?: number;
|
|
327
|
+
decay?: number;
|
|
328
|
+
};
|
|
329
|
+
};
|
|
304
330
|
}
|
|
305
331
|
/**
|
|
306
332
|
* Actual Filter Data sent to Lavalink
|
|
@@ -173,7 +173,7 @@ export interface LavalinkManager {
|
|
|
173
173
|
emit<U extends keyof LavalinkManagerEvents>(event: U, ...args: Parameters<LavalinkManagerEvents[U]>): boolean;
|
|
174
174
|
}
|
|
175
175
|
export declare class LavalinkManager extends EventEmitter {
|
|
176
|
-
static DefaultSources: Record<SearchPlatform, import("./Utils").LavalinkSearchPlatform>;
|
|
176
|
+
static DefaultSources: Record<SearchPlatform, import("./Utils").LavalinkSearchPlatform | import("./Utils").ClientCustomSearchPlatformUtils>;
|
|
177
177
|
static SourceLinksRegexes: Record<import("./Utils").SourcesRegex, RegExp>;
|
|
178
178
|
initiated: boolean;
|
|
179
179
|
readonly players: MiniMap<string, Player>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LavalinkSearchPlatform, SearchPlatform, SourcesRegex } from "./Utils";
|
|
2
|
-
export declare const DefaultSources: Record<SearchPlatform, LavalinkSearchPlatform>;
|
|
1
|
+
import { ClientCustomSearchPlatformUtils, LavalinkSearchPlatform, SearchPlatform, SourcesRegex } from "./Utils";
|
|
2
|
+
export declare const DefaultSources: Record<SearchPlatform, LavalinkSearchPlatform | ClientCustomSearchPlatformUtils>;
|
|
3
3
|
export declare const LavalinkPlugins: {
|
|
4
4
|
DuncteBot_Plugin: string;
|
|
5
5
|
LavaSrc: string;
|
|
@@ -18,7 +18,9 @@ export type DuncteSearchPlatform = "speak" | "tts";
|
|
|
18
18
|
export type LavalinkClientSearchPlatform = "bcsearch";
|
|
19
19
|
export type LavalinkClientSearchPlatformResolve = "bandcamp" | "bc";
|
|
20
20
|
export type LavalinkSearchPlatform = "ytsearch" | "ytmsearch" | "scsearch" | LavaSrcSearchPlatform | DuncteSearchPlatform | LavalinkClientSearchPlatform;
|
|
21
|
-
export type
|
|
21
|
+
export type ClientCustomSearchPlatformUtils = "local" | "http" | "https" | "link" | "uri";
|
|
22
|
+
export type ClientSearchPlatform = ClientCustomSearchPlatformUtils | // for file/link requests
|
|
23
|
+
"youtube" | "yt" | "youtube music" | "youtubemusic" | "ytm" | "musicyoutube" | "music youtube" | "soundcloud" | "sc" | "am" | "apple music" | "applemusic" | "apple" | "musicapple" | "music apple" | "sp" | "spsuggestion" | "spotify" | "spotify.com" | "spotifycom" | "dz" | "deezer" | "yandex" | "yandex music" | "yandexmusic" | "flowerytts" | "flowery" | "flowery.tts" | LavalinkClientSearchPlatformResolve | LavalinkClientSearchPlatform;
|
|
22
24
|
export type SearchPlatform = LavalinkSearchPlatform | ClientSearchPlatform;
|
|
23
25
|
export type SourcesRegex = "YoutubeRegex" | "YoutubeMusicRegex" | "SoundCloudRegex" | "SoundCloudMobileRegex" | "DeezerTrackRegex" | "DeezerArtistRegex" | "DeezerEpisodeRegex" | "DeezerMixesRegex" | "DeezerPageLinkRegex" | "DeezerPlaylistRegex" | "DeezerAlbumRegex" | "AllDeezerRegex" | "AllDeezerRegexWithoutPageLink" | "SpotifySongRegex" | "SpotifyPlaylistRegex" | "SpotifyArtistRegex" | "SpotifyEpisodeRegex" | "SpotifyShowRegex" | "SpotifyAlbumRegex" | "AllSpotifyRegex" | "mp3Url" | "m3uUrl" | "m3u8Url" | "mp4Url" | "m4aUrl" | "wavUrl" | "aacpUrl" | "tiktok" | "mixcloud" | "musicYandex" | "radiohost" | "bandcamp" | "appleMusic" | "TwitchTv" | "vimeo";
|
|
24
26
|
export interface PlaylistInfo {
|
package/package.json
CHANGED