lavalink-client 2.9.6 → 2.9.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/dist/index.cjs CHANGED
@@ -2000,6 +2000,7 @@ var LavalinkNode = class _LavalinkNode {
2000
2000
  /**
2001
2001
  * subscribe to lyrics updates for a guild
2002
2002
  * @param guildId the guild id of the player
2003
+ * @param skipTrackSource wether to skip the track source or not
2003
2004
  * @returns request data of the request
2004
2005
  *
2005
2006
  * @example
@@ -2009,15 +2010,18 @@ var LavalinkNode = class _LavalinkNode {
2009
2010
  * // const lyrics = await player.subscribeLyrics();
2010
2011
  * ```
2011
2012
  */
2012
- subscribe: async (guildId) => {
2013
+ subscribe: async (guildId, skipTrackSource) => {
2013
2014
  if (!this.sessionId) throw new Error("the Lavalink-Node is either not ready, or not up to date!");
2014
2015
  if (this._checkForPlugins && !this.info?.plugins?.find?.((v) => v.name === "lavalyrics-plugin"))
2015
2016
  throw new RangeError(
2016
2017
  `there is no lavalyrics-plugin available in the lavalink node (required for lyrics): ${this.id}`
2017
2018
  );
2018
- return await this.request(`/sessions/${this.sessionId}/players/${guildId}/lyrics/subscribe`, (options) => {
2019
- options.method = "POST";
2020
- });
2019
+ return await this.request(
2020
+ `/sessions/${this.sessionId}/players/${guildId}/lyrics/subscribe?skipTrackSource=${skipTrackSource ?? false}`,
2021
+ (options) => {
2022
+ options.method = "POST";
2023
+ }
2024
+ );
2021
2025
  },
2022
2026
  /**
2023
2027
  * unsubscribe from lyrics updates for a guild
@@ -5390,6 +5394,15 @@ var Player = class {
5390
5394
  get(key) {
5391
5395
  return this.data[key];
5392
5396
  }
5397
+ /**
5398
+ * Delete specific custom data.
5399
+ * @param key
5400
+ */
5401
+ deleteData(key) {
5402
+ if (key.startsWith("internal_")) return this;
5403
+ delete this.data[key];
5404
+ return this;
5405
+ }
5393
5406
  /**
5394
5407
  * CLears all the custom data.
5395
5408
  */
@@ -5915,15 +5928,16 @@ var Player = class {
5915
5928
  return await this.node.lyrics.get(track, skipTrackSource);
5916
5929
  }
5917
5930
  /**
5918
- * Subscribe to the lyrics event on a specific guild to active live lyrics events
5931
+ * Subscribe to the lyrics event on a specific guild to active live lyrics events}
5932
+ * @param skipTrackSource If true, it will not try to get the lyrics from the track source
5919
5933
  * @returns The unsubscribe function
5920
5934
  * @example
5921
5935
  * ```ts
5922
5936
  * const lyrics = await player.subscribeLyrics();
5923
5937
  * ```
5924
5938
  */
5925
- subscribeLyrics() {
5926
- return this.node.lyrics.subscribe(this.guildId);
5939
+ subscribeLyrics(skipTrackSource) {
5940
+ return this.node.lyrics.subscribe(this.guildId, skipTrackSource);
5927
5941
  }
5928
5942
  /**
5929
5943
  * Unsubscribe from the lyrics event on a specific guild to disable live lyrics events
package/dist/index.d.cts CHANGED
@@ -2690,6 +2690,11 @@ declare class Player {
2690
2690
  * @param key
2691
2691
  */
2692
2692
  get<T>(key: string): T;
2693
+ /**
2694
+ * Delete specific custom data.
2695
+ * @param key
2696
+ */
2697
+ deleteData(key: string): this;
2693
2698
  /**
2694
2699
  * CLears all the custom data.
2695
2700
  */
@@ -2815,14 +2820,15 @@ declare class Player {
2815
2820
  */
2816
2821
  getLyrics(track: Track, skipTrackSource?: boolean): Promise<LyricsResult>;
2817
2822
  /**
2818
- * Subscribe to the lyrics event on a specific guild to active live lyrics events
2823
+ * Subscribe to the lyrics event on a specific guild to active live lyrics events}
2824
+ * @param skipTrackSource If true, it will not try to get the lyrics from the track source
2819
2825
  * @returns The unsubscribe function
2820
2826
  * @example
2821
2827
  * ```ts
2822
2828
  * const lyrics = await player.subscribeLyrics();
2823
2829
  * ```
2824
2830
  */
2825
- subscribeLyrics(): Promise<unknown>;
2831
+ subscribeLyrics(skipTrackSource?: boolean): Promise<unknown>;
2826
2832
  /**
2827
2833
  * Unsubscribe from the lyrics event on a specific guild to disable live lyrics events
2828
2834
  * @returns The unsubscribe function
@@ -3344,6 +3350,7 @@ declare class LavalinkNode {
3344
3350
  /**
3345
3351
  * subscribe to lyrics updates for a guild
3346
3352
  * @param guildId the guild id of the player
3353
+ * @param skipTrackSource wether to skip the track source or not
3347
3354
  * @returns request data of the request
3348
3355
  *
3349
3356
  * @example
@@ -3353,7 +3360,7 @@ declare class LavalinkNode {
3353
3360
  * // const lyrics = await player.subscribeLyrics();
3354
3361
  * ```
3355
3362
  */
3356
- subscribe: (guildId: string) => Promise<unknown>;
3363
+ subscribe: (guildId: string, skipTrackSource?: boolean) => Promise<unknown>;
3357
3364
  /**
3358
3365
  * unsubscribe from lyrics updates for a guild
3359
3366
  * @param guildId the guild id of the player
package/dist/index.d.ts CHANGED
@@ -2690,6 +2690,11 @@ declare class Player {
2690
2690
  * @param key
2691
2691
  */
2692
2692
  get<T>(key: string): T;
2693
+ /**
2694
+ * Delete specific custom data.
2695
+ * @param key
2696
+ */
2697
+ deleteData(key: string): this;
2693
2698
  /**
2694
2699
  * CLears all the custom data.
2695
2700
  */
@@ -2815,14 +2820,15 @@ declare class Player {
2815
2820
  */
2816
2821
  getLyrics(track: Track, skipTrackSource?: boolean): Promise<LyricsResult>;
2817
2822
  /**
2818
- * Subscribe to the lyrics event on a specific guild to active live lyrics events
2823
+ * Subscribe to the lyrics event on a specific guild to active live lyrics events}
2824
+ * @param skipTrackSource If true, it will not try to get the lyrics from the track source
2819
2825
  * @returns The unsubscribe function
2820
2826
  * @example
2821
2827
  * ```ts
2822
2828
  * const lyrics = await player.subscribeLyrics();
2823
2829
  * ```
2824
2830
  */
2825
- subscribeLyrics(): Promise<unknown>;
2831
+ subscribeLyrics(skipTrackSource?: boolean): Promise<unknown>;
2826
2832
  /**
2827
2833
  * Unsubscribe from the lyrics event on a specific guild to disable live lyrics events
2828
2834
  * @returns The unsubscribe function
@@ -3344,6 +3350,7 @@ declare class LavalinkNode {
3344
3350
  /**
3345
3351
  * subscribe to lyrics updates for a guild
3346
3352
  * @param guildId the guild id of the player
3353
+ * @param skipTrackSource wether to skip the track source or not
3347
3354
  * @returns request data of the request
3348
3355
  *
3349
3356
  * @example
@@ -3353,7 +3360,7 @@ declare class LavalinkNode {
3353
3360
  * // const lyrics = await player.subscribeLyrics();
3354
3361
  * ```
3355
3362
  */
3356
- subscribe: (guildId: string) => Promise<unknown>;
3363
+ subscribe: (guildId: string, skipTrackSource?: boolean) => Promise<unknown>;
3357
3364
  /**
3358
3365
  * unsubscribe from lyrics updates for a guild
3359
3366
  * @param guildId the guild id of the player
package/dist/index.js CHANGED
@@ -1936,6 +1936,7 @@ var LavalinkNode = class _LavalinkNode {
1936
1936
  /**
1937
1937
  * subscribe to lyrics updates for a guild
1938
1938
  * @param guildId the guild id of the player
1939
+ * @param skipTrackSource wether to skip the track source or not
1939
1940
  * @returns request data of the request
1940
1941
  *
1941
1942
  * @example
@@ -1945,15 +1946,18 @@ var LavalinkNode = class _LavalinkNode {
1945
1946
  * // const lyrics = await player.subscribeLyrics();
1946
1947
  * ```
1947
1948
  */
1948
- subscribe: async (guildId) => {
1949
+ subscribe: async (guildId, skipTrackSource) => {
1949
1950
  if (!this.sessionId) throw new Error("the Lavalink-Node is either not ready, or not up to date!");
1950
1951
  if (this._checkForPlugins && !this.info?.plugins?.find?.((v) => v.name === "lavalyrics-plugin"))
1951
1952
  throw new RangeError(
1952
1953
  `there is no lavalyrics-plugin available in the lavalink node (required for lyrics): ${this.id}`
1953
1954
  );
1954
- return await this.request(`/sessions/${this.sessionId}/players/${guildId}/lyrics/subscribe`, (options) => {
1955
- options.method = "POST";
1956
- });
1955
+ return await this.request(
1956
+ `/sessions/${this.sessionId}/players/${guildId}/lyrics/subscribe?skipTrackSource=${skipTrackSource ?? false}`,
1957
+ (options) => {
1958
+ options.method = "POST";
1959
+ }
1960
+ );
1957
1961
  },
1958
1962
  /**
1959
1963
  * unsubscribe from lyrics updates for a guild
@@ -5326,6 +5330,15 @@ var Player = class {
5326
5330
  get(key) {
5327
5331
  return this.data[key];
5328
5332
  }
5333
+ /**
5334
+ * Delete specific custom data.
5335
+ * @param key
5336
+ */
5337
+ deleteData(key) {
5338
+ if (key.startsWith("internal_")) return this;
5339
+ delete this.data[key];
5340
+ return this;
5341
+ }
5329
5342
  /**
5330
5343
  * CLears all the custom data.
5331
5344
  */
@@ -5851,15 +5864,16 @@ var Player = class {
5851
5864
  return await this.node.lyrics.get(track, skipTrackSource);
5852
5865
  }
5853
5866
  /**
5854
- * Subscribe to the lyrics event on a specific guild to active live lyrics events
5867
+ * Subscribe to the lyrics event on a specific guild to active live lyrics events}
5868
+ * @param skipTrackSource If true, it will not try to get the lyrics from the track source
5855
5869
  * @returns The unsubscribe function
5856
5870
  * @example
5857
5871
  * ```ts
5858
5872
  * const lyrics = await player.subscribeLyrics();
5859
5873
  * ```
5860
5874
  */
5861
- subscribeLyrics() {
5862
- return this.node.lyrics.subscribe(this.guildId);
5875
+ subscribeLyrics(skipTrackSource) {
5876
+ return this.node.lyrics.subscribe(this.guildId, skipTrackSource);
5863
5877
  }
5864
5878
  /**
5865
5879
  * Unsubscribe from the lyrics event on a specific guild to disable live lyrics events
package/dist/index.mjs CHANGED
@@ -1936,6 +1936,7 @@ var LavalinkNode = class _LavalinkNode {
1936
1936
  /**
1937
1937
  * subscribe to lyrics updates for a guild
1938
1938
  * @param guildId the guild id of the player
1939
+ * @param skipTrackSource wether to skip the track source or not
1939
1940
  * @returns request data of the request
1940
1941
  *
1941
1942
  * @example
@@ -1945,15 +1946,18 @@ var LavalinkNode = class _LavalinkNode {
1945
1946
  * // const lyrics = await player.subscribeLyrics();
1946
1947
  * ```
1947
1948
  */
1948
- subscribe: async (guildId) => {
1949
+ subscribe: async (guildId, skipTrackSource) => {
1949
1950
  if (!this.sessionId) throw new Error("the Lavalink-Node is either not ready, or not up to date!");
1950
1951
  if (this._checkForPlugins && !this.info?.plugins?.find?.((v) => v.name === "lavalyrics-plugin"))
1951
1952
  throw new RangeError(
1952
1953
  `there is no lavalyrics-plugin available in the lavalink node (required for lyrics): ${this.id}`
1953
1954
  );
1954
- return await this.request(`/sessions/${this.sessionId}/players/${guildId}/lyrics/subscribe`, (options) => {
1955
- options.method = "POST";
1956
- });
1955
+ return await this.request(
1956
+ `/sessions/${this.sessionId}/players/${guildId}/lyrics/subscribe?skipTrackSource=${skipTrackSource ?? false}`,
1957
+ (options) => {
1958
+ options.method = "POST";
1959
+ }
1960
+ );
1957
1961
  },
1958
1962
  /**
1959
1963
  * unsubscribe from lyrics updates for a guild
@@ -5326,6 +5330,15 @@ var Player = class {
5326
5330
  get(key) {
5327
5331
  return this.data[key];
5328
5332
  }
5333
+ /**
5334
+ * Delete specific custom data.
5335
+ * @param key
5336
+ */
5337
+ deleteData(key) {
5338
+ if (key.startsWith("internal_")) return this;
5339
+ delete this.data[key];
5340
+ return this;
5341
+ }
5329
5342
  /**
5330
5343
  * CLears all the custom data.
5331
5344
  */
@@ -5851,15 +5864,16 @@ var Player = class {
5851
5864
  return await this.node.lyrics.get(track, skipTrackSource);
5852
5865
  }
5853
5866
  /**
5854
- * Subscribe to the lyrics event on a specific guild to active live lyrics events
5867
+ * Subscribe to the lyrics event on a specific guild to active live lyrics events}
5868
+ * @param skipTrackSource If true, it will not try to get the lyrics from the track source
5855
5869
  * @returns The unsubscribe function
5856
5870
  * @example
5857
5871
  * ```ts
5858
5872
  * const lyrics = await player.subscribeLyrics();
5859
5873
  * ```
5860
5874
  */
5861
- subscribeLyrics() {
5862
- return this.node.lyrics.subscribe(this.guildId);
5875
+ subscribeLyrics(skipTrackSource) {
5876
+ return this.node.lyrics.subscribe(this.guildId, skipTrackSource);
5863
5877
  }
5864
5878
  /**
5865
5879
  * Unsubscribe from the lyrics event on a specific guild to disable live lyrics events
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lavalink-client",
3
- "version": "2.9.6",
3
+ "version": "2.9.7",
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",