lavalink-client 2.9.7 → 2.9.8

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/dist/index.cjs CHANGED
@@ -2414,7 +2414,7 @@ var LavalinkNode = class _LavalinkNode {
2414
2414
  player.filterManager.checkFiltersState(oldFilterTimescale);
2415
2415
  }
2416
2416
  }
2417
- if (res?.guildId === "string" && typeof res?.voice !== "undefined") {
2417
+ if (typeof res?.guildId === "string" && typeof res?.voice !== "undefined") {
2418
2418
  const player = this._LManager.getPlayer(data.guildId);
2419
2419
  if (!player) return;
2420
2420
  if (typeof res?.voice?.connected === "boolean" && res.voice.connected === false) {
@@ -5379,21 +5379,39 @@ var Player = class {
5379
5379
  );
5380
5380
  }
5381
5381
  /**
5382
- * Set custom data.
5382
+ * Set custom data. (Deprecated - Use Player#setData instead.)
5383
5383
  * @param key
5384
5384
  * @param value
5385
+ * @deprecated Use Player#setData instead.
5385
5386
  */
5386
5387
  set(key, value) {
5387
5388
  this.data[key] = value;
5388
5389
  return this;
5389
5390
  }
5390
5391
  /**
5391
- * Get custom data.
5392
+ * Get custom data. (Deprecated - Use Player#getData instead.)
5392
5393
  * @param key
5394
+ * @deprecated Use Player#getData instead.
5393
5395
  */
5394
5396
  get(key) {
5395
5397
  return this.data[key];
5396
5398
  }
5399
+ /**
5400
+ * Set custom data.
5401
+ * @param key
5402
+ * @param value
5403
+ */
5404
+ setData(key, value) {
5405
+ this.data[key] = value;
5406
+ return this;
5407
+ }
5408
+ /**
5409
+ * Get custom data.
5410
+ * @param key
5411
+ */
5412
+ getData(key) {
5413
+ return this.data[key];
5414
+ }
5397
5415
  /**
5398
5416
  * Delete specific custom data.
5399
5417
  * @param key
package/dist/index.d.cts CHANGED
@@ -2680,16 +2680,29 @@ declare class Player {
2680
2680
  */
2681
2681
  constructor(options: PlayerOptions, LavalinkManager: LavalinkManager, dontEmitPlayerCreateEvent?: boolean);
2682
2682
  /**
2683
- * Set custom data.
2683
+ * Set custom data. (Deprecated - Use Player#setData instead.)
2684
2684
  * @param key
2685
2685
  * @param value
2686
+ * @deprecated Use Player#setData instead.
2686
2687
  */
2687
2688
  set(key: string, value: unknown): this;
2688
2689
  /**
2689
- * Get custom data.
2690
+ * Get custom data. (Deprecated - Use Player#getData instead.)
2690
2691
  * @param key
2692
+ * @deprecated Use Player#getData instead.
2691
2693
  */
2692
2694
  get<T>(key: string): T;
2695
+ /**
2696
+ * Set custom data.
2697
+ * @param key
2698
+ * @param value
2699
+ */
2700
+ setData(key: string, value: unknown): this;
2701
+ /**
2702
+ * Get custom data.
2703
+ * @param key
2704
+ */
2705
+ getData<T>(key: string): T;
2693
2706
  /**
2694
2707
  * Delete specific custom data.
2695
2708
  * @param key
package/dist/index.d.ts CHANGED
@@ -2680,16 +2680,29 @@ declare class Player {
2680
2680
  */
2681
2681
  constructor(options: PlayerOptions, LavalinkManager: LavalinkManager, dontEmitPlayerCreateEvent?: boolean);
2682
2682
  /**
2683
- * Set custom data.
2683
+ * Set custom data. (Deprecated - Use Player#setData instead.)
2684
2684
  * @param key
2685
2685
  * @param value
2686
+ * @deprecated Use Player#setData instead.
2686
2687
  */
2687
2688
  set(key: string, value: unknown): this;
2688
2689
  /**
2689
- * Get custom data.
2690
+ * Get custom data. (Deprecated - Use Player#getData instead.)
2690
2691
  * @param key
2692
+ * @deprecated Use Player#getData instead.
2691
2693
  */
2692
2694
  get<T>(key: string): T;
2695
+ /**
2696
+ * Set custom data.
2697
+ * @param key
2698
+ * @param value
2699
+ */
2700
+ setData(key: string, value: unknown): this;
2701
+ /**
2702
+ * Get custom data.
2703
+ * @param key
2704
+ */
2705
+ getData<T>(key: string): T;
2693
2706
  /**
2694
2707
  * Delete specific custom data.
2695
2708
  * @param key
package/dist/index.js CHANGED
@@ -2350,7 +2350,7 @@ var LavalinkNode = class _LavalinkNode {
2350
2350
  player.filterManager.checkFiltersState(oldFilterTimescale);
2351
2351
  }
2352
2352
  }
2353
- if (res?.guildId === "string" && typeof res?.voice !== "undefined") {
2353
+ if (typeof res?.guildId === "string" && typeof res?.voice !== "undefined") {
2354
2354
  const player = this._LManager.getPlayer(data.guildId);
2355
2355
  if (!player) return;
2356
2356
  if (typeof res?.voice?.connected === "boolean" && res.voice.connected === false) {
@@ -5315,21 +5315,39 @@ var Player = class {
5315
5315
  );
5316
5316
  }
5317
5317
  /**
5318
- * Set custom data.
5318
+ * Set custom data. (Deprecated - Use Player#setData instead.)
5319
5319
  * @param key
5320
5320
  * @param value
5321
+ * @deprecated Use Player#setData instead.
5321
5322
  */
5322
5323
  set(key, value) {
5323
5324
  this.data[key] = value;
5324
5325
  return this;
5325
5326
  }
5326
5327
  /**
5327
- * Get custom data.
5328
+ * Get custom data. (Deprecated - Use Player#getData instead.)
5328
5329
  * @param key
5330
+ * @deprecated Use Player#getData instead.
5329
5331
  */
5330
5332
  get(key) {
5331
5333
  return this.data[key];
5332
5334
  }
5335
+ /**
5336
+ * Set custom data.
5337
+ * @param key
5338
+ * @param value
5339
+ */
5340
+ setData(key, value) {
5341
+ this.data[key] = value;
5342
+ return this;
5343
+ }
5344
+ /**
5345
+ * Get custom data.
5346
+ * @param key
5347
+ */
5348
+ getData(key) {
5349
+ return this.data[key];
5350
+ }
5333
5351
  /**
5334
5352
  * Delete specific custom data.
5335
5353
  * @param key
package/dist/index.mjs CHANGED
@@ -2350,7 +2350,7 @@ var LavalinkNode = class _LavalinkNode {
2350
2350
  player.filterManager.checkFiltersState(oldFilterTimescale);
2351
2351
  }
2352
2352
  }
2353
- if (res?.guildId === "string" && typeof res?.voice !== "undefined") {
2353
+ if (typeof res?.guildId === "string" && typeof res?.voice !== "undefined") {
2354
2354
  const player = this._LManager.getPlayer(data.guildId);
2355
2355
  if (!player) return;
2356
2356
  if (typeof res?.voice?.connected === "boolean" && res.voice.connected === false) {
@@ -5315,21 +5315,39 @@ var Player = class {
5315
5315
  );
5316
5316
  }
5317
5317
  /**
5318
- * Set custom data.
5318
+ * Set custom data. (Deprecated - Use Player#setData instead.)
5319
5319
  * @param key
5320
5320
  * @param value
5321
+ * @deprecated Use Player#setData instead.
5321
5322
  */
5322
5323
  set(key, value) {
5323
5324
  this.data[key] = value;
5324
5325
  return this;
5325
5326
  }
5326
5327
  /**
5327
- * Get custom data.
5328
+ * Get custom data. (Deprecated - Use Player#getData instead.)
5328
5329
  * @param key
5330
+ * @deprecated Use Player#getData instead.
5329
5331
  */
5330
5332
  get(key) {
5331
5333
  return this.data[key];
5332
5334
  }
5335
+ /**
5336
+ * Set custom data.
5337
+ * @param key
5338
+ * @param value
5339
+ */
5340
+ setData(key, value) {
5341
+ this.data[key] = value;
5342
+ return this;
5343
+ }
5344
+ /**
5345
+ * Get custom data.
5346
+ * @param key
5347
+ */
5348
+ getData(key) {
5349
+ return this.data[key];
5350
+ }
5333
5351
  /**
5334
5352
  * Delete specific custom data.
5335
5353
  * @param key
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lavalink-client",
3
- "version": "2.9.7",
3
+ "version": "2.9.8",
4
4
  "description": "Easy, flexible and feature-rich lavalink@v4 Client. Both for Beginners and Proficients. - Supports NodeLink@v3 too.",
5
5
  "keywords": [
6
6
  "advanced",