lavalink-client 2.6.6 → 2.6.7

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 CHANGED
@@ -114,9 +114,11 @@ This client powers various Discord bots:
114
114
  - [Stelle](https://github.com/Ganyu-Studios/stelle-music) (@EvilG-MC)
115
115
  - [Panais](https://panais.xyz/) (@LucasB25)
116
116
  - [Akyn](https://akynbot.vercel.app/) (@notdeltaxd)
117
+ - [ARINO](https://site.arinoapp.qzz.io/) (@ryanwtf88)
117
118
  - **Bots Community (Users):**
118
119
  - [Soundy](https://github.com/idMJA/Soundy) (@idMJA)
119
120
  - [BeatBot ](https://getbeatbot.vercel.app/) (@zenitsujs)
121
+ - [Atom Music](https://top.gg/bot/1320469557411971165) (@sakshamyep)
120
122
 
121
123
  ***
122
124
 
@@ -457,3 +459,5 @@ if (response.tracks.length > 0) {
457
459
  </details>
458
460
 
459
461
  </div>
462
+
463
+
package/dist/index.d.mts CHANGED
@@ -332,6 +332,7 @@ declare class FilterManager {
332
332
  * ```
333
333
  */
334
334
  applyPlayerFilters(): Promise<void>;
335
+ privateNot0(value: number | undefined): boolean;
335
336
  /**
336
337
  * Checks if the filters are correctly stated (active / not-active) - mostly used internally.
337
338
  * @param oldFilterTimescale
package/dist/index.d.ts CHANGED
@@ -332,6 +332,7 @@ declare class FilterManager {
332
332
  * ```
333
333
  */
334
334
  applyPlayerFilters(): Promise<void>;
335
+ privateNot0(value: number | undefined): boolean;
335
336
  /**
336
337
  * Checks if the filters are correctly stated (active / not-active) - mostly used internally.
337
338
  * @param oldFilterTimescale
package/dist/index.js CHANGED
@@ -2882,6 +2882,9 @@ var FilterManager = class {
2882
2882
  this.player.ping.lavalink = Math.round((performance.now() - now) / 10) / 100;
2883
2883
  return;
2884
2884
  }
2885
+ privateNot0(value) {
2886
+ return typeof value === "number" && value !== 0;
2887
+ }
2885
2888
  /**
2886
2889
  * Checks if the filters are correctly stated (active / not-active) - mostly used internally.
2887
2890
  * @param oldFilterTimescale
@@ -2896,9 +2899,10 @@ var FilterManager = class {
2896
2899
  * ```
2897
2900
  */
2898
2901
  checkFiltersState(oldFilterTimescale) {
2899
- this.filters.rotation = this.data.rotation.rotationHz !== 0;
2900
- this.filters.vibrato = this.data.vibrato.frequency !== 0 || this.data.vibrato.depth !== 0;
2901
- this.filters.tremolo = this.data.tremolo.frequency !== 0 || this.data.tremolo.depth !== 0;
2902
+ this.data = this.data ?? {};
2903
+ this.filters.rotation = this.privateNot0(this.data.rotation?.rotationHz);
2904
+ this.filters.vibrato = this.privateNot0(this.data.vibrato?.frequency) || this.privateNot0(this.data.vibrato?.depth);
2905
+ this.filters.tremolo = this.privateNot0(this.data.tremolo?.frequency) || this.privateNot0(this.data.tremolo?.depth);
2902
2906
  const lavalinkFilterData = this.data.pluginFilters?.["lavalink-filter-plugin"] || { echo: { decay: this.data.pluginFilters?.echo?.decay && !this.data.pluginFilters?.echo?.echoLength ? this.data.pluginFilters.echo.decay : 0, delay: this.data.pluginFilters?.echo?.delay || 0 }, reverb: { gains: [], delays: [], ...this.data.pluginFilters.reverb } };
2903
2907
  this.filters.lavalinkFilterPlugin.echo = lavalinkFilterData.echo.decay !== 0 || lavalinkFilterData.echo.delay !== 0;
2904
2908
  this.filters.lavalinkFilterPlugin.reverb = lavalinkFilterData.reverb?.delays?.length !== 0 || lavalinkFilterData.reverb?.gains?.length !== 0;
package/dist/index.mjs CHANGED
@@ -2822,6 +2822,9 @@ var FilterManager = class {
2822
2822
  this.player.ping.lavalink = Math.round((performance.now() - now) / 10) / 100;
2823
2823
  return;
2824
2824
  }
2825
+ privateNot0(value) {
2826
+ return typeof value === "number" && value !== 0;
2827
+ }
2825
2828
  /**
2826
2829
  * Checks if the filters are correctly stated (active / not-active) - mostly used internally.
2827
2830
  * @param oldFilterTimescale
@@ -2836,9 +2839,10 @@ var FilterManager = class {
2836
2839
  * ```
2837
2840
  */
2838
2841
  checkFiltersState(oldFilterTimescale) {
2839
- this.filters.rotation = this.data.rotation.rotationHz !== 0;
2840
- this.filters.vibrato = this.data.vibrato.frequency !== 0 || this.data.vibrato.depth !== 0;
2841
- this.filters.tremolo = this.data.tremolo.frequency !== 0 || this.data.tremolo.depth !== 0;
2842
+ this.data = this.data ?? {};
2843
+ this.filters.rotation = this.privateNot0(this.data.rotation?.rotationHz);
2844
+ this.filters.vibrato = this.privateNot0(this.data.vibrato?.frequency) || this.privateNot0(this.data.vibrato?.depth);
2845
+ this.filters.tremolo = this.privateNot0(this.data.tremolo?.frequency) || this.privateNot0(this.data.tremolo?.depth);
2842
2846
  const lavalinkFilterData = this.data.pluginFilters?.["lavalink-filter-plugin"] || { echo: { decay: this.data.pluginFilters?.echo?.decay && !this.data.pluginFilters?.echo?.echoLength ? this.data.pluginFilters.echo.decay : 0, delay: this.data.pluginFilters?.echo?.delay || 0 }, reverb: { gains: [], delays: [], ...this.data.pluginFilters.reverb } };
2843
2847
  this.filters.lavalinkFilterPlugin.echo = lavalinkFilterData.echo.decay !== 0 || lavalinkFilterData.echo.delay !== 0;
2844
2848
  this.filters.lavalinkFilterPlugin.reverb = lavalinkFilterData.reverb?.delays?.length !== 0 || lavalinkFilterData.reverb?.gains?.length !== 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lavalink-client",
3
- "version": "2.6.6",
3
+ "version": "2.6.7",
4
4
  "description": "Easy, flexible and feature-rich lavalink@v4 Client. Both for Beginners and Proficients.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",