lavalink-client 1.1.6 → 1.1.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.
@@ -18,8 +18,11 @@ export interface QueueStoreManager extends Record<string, any> {
18
18
  parse: (value: unknown) => Promise<Partial<StoredQueue>>;
19
19
  }
20
20
  export interface ManagerQueueOptions {
21
+ /** Maximum Amount of tracks for the queue.previous array */
21
22
  maxPreviousTracks?: number;
23
+ /** Custom Queue Store option */
22
24
  queueStore?: QueueStoreManager;
25
+ /** Custom Queue Watcher class */
23
26
  queueChangesWatcher?: QueueChangesWatcher;
24
27
  }
25
28
  export interface QueueSaver {
@@ -1,30 +1,53 @@
1
1
  import { Player } from "./Player";
2
2
  import { Base64 } from "./Utils";
3
- type LavalinkSourceNames = "youtube" | "youtubemusic" | "soundcloud" | "bandcamp" | "twitch";
4
- type LavalinkPlugin_LavaSrc_SourceNames = "deezer" | "spotify" | "applemusic" | "yandexmusic" | "flowery-tts";
5
- type SourceNames = LavalinkSourceNames | LavalinkPlugin_LavaSrc_SourceNames;
3
+ /** Sourcenames provided by lavalink server */
4
+ export type LavalinkSourceNames = "youtube" | "youtubemusic" | "soundcloud" | "bandcamp" | "twitch";
5
+ /** Source Names provided by lava src plugin */
6
+ export type LavalinkPlugin_LavaSrc_SourceNames = "deezer" | "spotify" | "applemusic" | "yandexmusic" | "flowery-tts";
7
+ /** The SourceNames provided by lavalink */
8
+ export type SourceNames = LavalinkSourceNames | LavalinkPlugin_LavaSrc_SourceNames;
6
9
  export interface LavalinkTrackInfo {
10
+ /** The Identifier of the Track */
7
11
  identifier: string;
12
+ /** The Track Title / Name */
8
13
  title: string;
14
+ /** The Name of the Author */
9
15
  author: string;
16
+ /** The duration of the Track */
10
17
  length: number;
18
+ /** The URL of the artwork if available */
11
19
  artworkUrl: string | null;
20
+ /** The URL (aka Link) of the Track called URI */
12
21
  uri: string;
22
+ /** The Source name of the Track, e.g. soundcloud, youtube, spotify */
13
23
  sourceName: SourceNames;
24
+ /** Wether the audio is seekable */
14
25
  isSeekable: boolean;
26
+ /** Wether the audio is of a live stream */
15
27
  isStream: boolean;
28
+ /** If isrc code is available, it's provided */
16
29
  isrc: string | null;
17
30
  }
18
31
  export interface TrackInfo {
32
+ /** The Identifier of the Track */
19
33
  identifier: string;
34
+ /** The Track Title / Name */
20
35
  title: string;
36
+ /** The Name of the Author */
21
37
  author: string;
38
+ /** The duration of the Track */
22
39
  duration: number;
40
+ /** The URL of the artwork if available */
23
41
  artworkUrl: string | null;
42
+ /** The URL (aka Link) of the Track called URI */
24
43
  uri: string;
44
+ /** The Source name of the Track, e.g. soundcloud, youtube, spotify */
25
45
  sourceName: SourceNames;
46
+ /** Wether the audio is seekable */
26
47
  isSeekable: boolean;
48
+ /** Wether the audio is of a live stream */
27
49
  isStream: boolean;
50
+ /** If isrc code is available, it's provided */
28
51
  isrc: string | null;
29
52
  }
30
53
  export interface PluginInfo {
@@ -95,4 +118,3 @@ export interface UnresolvedTrack {
95
118
  /** The Track's Requester */
96
119
  requester?: unknown;
97
120
  }
98
- export {};
@@ -119,7 +119,7 @@ export declare class MiniMap<K, V> extends Map<K, V> {
119
119
  filter<This, K2 extends K>(fn: (this: This, value: V, key: K, miniMap: this) => key is K2, thisArg: This): MiniMap<K2, V>;
120
120
  filter<This, V2 extends V>(fn: (this: This, value: V, key: K, miniMap: this) => value is V2, thisArg: This): MiniMap<K, V2>;
121
121
  filter<This>(fn: (this: This, value: V, key: K, miniMap: this) => boolean, thisArg: This): MiniMap<K, V>;
122
- toJSON(): V[];
122
+ toJSON(): [K, V][];
123
123
  /**
124
124
  * Maps each item to another value into an array. Identical in behavior to
125
125
  * [Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
@@ -256,8 +256,7 @@ class MiniMap extends Map {
256
256
  return results;
257
257
  }
258
258
  toJSON() {
259
- // toJSON is called recursively by JSON.stringify.
260
- return [...this.values()];
259
+ return [...this.entries()];
261
260
  }
262
261
  map(fn, thisArg) {
263
262
  if (typeof thisArg !== 'undefined')
@@ -18,8 +18,11 @@ export interface QueueStoreManager extends Record<string, any> {
18
18
  parse: (value: unknown) => Promise<Partial<StoredQueue>>;
19
19
  }
20
20
  export interface ManagerQueueOptions {
21
+ /** Maximum Amount of tracks for the queue.previous array */
21
22
  maxPreviousTracks?: number;
23
+ /** Custom Queue Store option */
22
24
  queueStore?: QueueStoreManager;
25
+ /** Custom Queue Watcher class */
23
26
  queueChangesWatcher?: QueueChangesWatcher;
24
27
  }
25
28
  export interface QueueSaver {
@@ -1,30 +1,53 @@
1
1
  import { Player } from "./Player";
2
2
  import { Base64 } from "./Utils";
3
- type LavalinkSourceNames = "youtube" | "youtubemusic" | "soundcloud" | "bandcamp" | "twitch";
4
- type LavalinkPlugin_LavaSrc_SourceNames = "deezer" | "spotify" | "applemusic" | "yandexmusic" | "flowery-tts";
5
- type SourceNames = LavalinkSourceNames | LavalinkPlugin_LavaSrc_SourceNames;
3
+ /** Sourcenames provided by lavalink server */
4
+ export type LavalinkSourceNames = "youtube" | "youtubemusic" | "soundcloud" | "bandcamp" | "twitch";
5
+ /** Source Names provided by lava src plugin */
6
+ export type LavalinkPlugin_LavaSrc_SourceNames = "deezer" | "spotify" | "applemusic" | "yandexmusic" | "flowery-tts";
7
+ /** The SourceNames provided by lavalink */
8
+ export type SourceNames = LavalinkSourceNames | LavalinkPlugin_LavaSrc_SourceNames;
6
9
  export interface LavalinkTrackInfo {
10
+ /** The Identifier of the Track */
7
11
  identifier: string;
12
+ /** The Track Title / Name */
8
13
  title: string;
14
+ /** The Name of the Author */
9
15
  author: string;
16
+ /** The duration of the Track */
10
17
  length: number;
18
+ /** The URL of the artwork if available */
11
19
  artworkUrl: string | null;
20
+ /** The URL (aka Link) of the Track called URI */
12
21
  uri: string;
22
+ /** The Source name of the Track, e.g. soundcloud, youtube, spotify */
13
23
  sourceName: SourceNames;
24
+ /** Wether the audio is seekable */
14
25
  isSeekable: boolean;
26
+ /** Wether the audio is of a live stream */
15
27
  isStream: boolean;
28
+ /** If isrc code is available, it's provided */
16
29
  isrc: string | null;
17
30
  }
18
31
  export interface TrackInfo {
32
+ /** The Identifier of the Track */
19
33
  identifier: string;
34
+ /** The Track Title / Name */
20
35
  title: string;
36
+ /** The Name of the Author */
21
37
  author: string;
38
+ /** The duration of the Track */
22
39
  duration: number;
40
+ /** The URL of the artwork if available */
23
41
  artworkUrl: string | null;
42
+ /** The URL (aka Link) of the Track called URI */
24
43
  uri: string;
44
+ /** The Source name of the Track, e.g. soundcloud, youtube, spotify */
25
45
  sourceName: SourceNames;
46
+ /** Wether the audio is seekable */
26
47
  isSeekable: boolean;
48
+ /** Wether the audio is of a live stream */
27
49
  isStream: boolean;
50
+ /** If isrc code is available, it's provided */
28
51
  isrc: string | null;
29
52
  }
30
53
  export interface PluginInfo {
@@ -95,4 +118,3 @@ export interface UnresolvedTrack {
95
118
  /** The Track's Requester */
96
119
  requester?: unknown;
97
120
  }
98
- export {};
@@ -119,7 +119,7 @@ export declare class MiniMap<K, V> extends Map<K, V> {
119
119
  filter<This, K2 extends K>(fn: (this: This, value: V, key: K, miniMap: this) => key is K2, thisArg: This): MiniMap<K2, V>;
120
120
  filter<This, V2 extends V>(fn: (this: This, value: V, key: K, miniMap: this) => value is V2, thisArg: This): MiniMap<K, V2>;
121
121
  filter<This>(fn: (this: This, value: V, key: K, miniMap: this) => boolean, thisArg: This): MiniMap<K, V>;
122
- toJSON(): V[];
122
+ toJSON(): [K, V][];
123
123
  /**
124
124
  * Maps each item to another value into an array. Identical in behavior to
125
125
  * [Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
@@ -252,8 +252,7 @@ export class MiniMap extends Map {
252
252
  return results;
253
253
  }
254
254
  toJSON() {
255
- // toJSON is called recursively by JSON.stringify.
256
- return [...this.values()];
255
+ return [...this.entries()];
257
256
  }
258
257
  map(fn, thisArg) {
259
258
  if (typeof thisArg !== 'undefined')
@@ -18,8 +18,11 @@ export interface QueueStoreManager extends Record<string, any> {
18
18
  parse: (value: unknown) => Promise<Partial<StoredQueue>>;
19
19
  }
20
20
  export interface ManagerQueueOptions {
21
+ /** Maximum Amount of tracks for the queue.previous array */
21
22
  maxPreviousTracks?: number;
23
+ /** Custom Queue Store option */
22
24
  queueStore?: QueueStoreManager;
25
+ /** Custom Queue Watcher class */
23
26
  queueChangesWatcher?: QueueChangesWatcher;
24
27
  }
25
28
  export interface QueueSaver {
@@ -1,30 +1,53 @@
1
1
  import { Player } from "./Player";
2
2
  import { Base64 } from "./Utils";
3
- type LavalinkSourceNames = "youtube" | "youtubemusic" | "soundcloud" | "bandcamp" | "twitch";
4
- type LavalinkPlugin_LavaSrc_SourceNames = "deezer" | "spotify" | "applemusic" | "yandexmusic" | "flowery-tts";
5
- type SourceNames = LavalinkSourceNames | LavalinkPlugin_LavaSrc_SourceNames;
3
+ /** Sourcenames provided by lavalink server */
4
+ export type LavalinkSourceNames = "youtube" | "youtubemusic" | "soundcloud" | "bandcamp" | "twitch";
5
+ /** Source Names provided by lava src plugin */
6
+ export type LavalinkPlugin_LavaSrc_SourceNames = "deezer" | "spotify" | "applemusic" | "yandexmusic" | "flowery-tts";
7
+ /** The SourceNames provided by lavalink */
8
+ export type SourceNames = LavalinkSourceNames | LavalinkPlugin_LavaSrc_SourceNames;
6
9
  export interface LavalinkTrackInfo {
10
+ /** The Identifier of the Track */
7
11
  identifier: string;
12
+ /** The Track Title / Name */
8
13
  title: string;
14
+ /** The Name of the Author */
9
15
  author: string;
16
+ /** The duration of the Track */
10
17
  length: number;
18
+ /** The URL of the artwork if available */
11
19
  artworkUrl: string | null;
20
+ /** The URL (aka Link) of the Track called URI */
12
21
  uri: string;
22
+ /** The Source name of the Track, e.g. soundcloud, youtube, spotify */
13
23
  sourceName: SourceNames;
24
+ /** Wether the audio is seekable */
14
25
  isSeekable: boolean;
26
+ /** Wether the audio is of a live stream */
15
27
  isStream: boolean;
28
+ /** If isrc code is available, it's provided */
16
29
  isrc: string | null;
17
30
  }
18
31
  export interface TrackInfo {
32
+ /** The Identifier of the Track */
19
33
  identifier: string;
34
+ /** The Track Title / Name */
20
35
  title: string;
36
+ /** The Name of the Author */
21
37
  author: string;
38
+ /** The duration of the Track */
22
39
  duration: number;
40
+ /** The URL of the artwork if available */
23
41
  artworkUrl: string | null;
42
+ /** The URL (aka Link) of the Track called URI */
24
43
  uri: string;
44
+ /** The Source name of the Track, e.g. soundcloud, youtube, spotify */
25
45
  sourceName: SourceNames;
46
+ /** Wether the audio is seekable */
26
47
  isSeekable: boolean;
48
+ /** Wether the audio is of a live stream */
27
49
  isStream: boolean;
50
+ /** If isrc code is available, it's provided */
28
51
  isrc: string | null;
29
52
  }
30
53
  export interface PluginInfo {
@@ -95,4 +118,3 @@ export interface UnresolvedTrack {
95
118
  /** The Track's Requester */
96
119
  requester?: unknown;
97
120
  }
98
- export {};
@@ -119,7 +119,7 @@ export declare class MiniMap<K, V> extends Map<K, V> {
119
119
  filter<This, K2 extends K>(fn: (this: This, value: V, key: K, miniMap: this) => key is K2, thisArg: This): MiniMap<K2, V>;
120
120
  filter<This, V2 extends V>(fn: (this: This, value: V, key: K, miniMap: this) => value is V2, thisArg: This): MiniMap<K, V2>;
121
121
  filter<This>(fn: (this: This, value: V, key: K, miniMap: this) => boolean, thisArg: This): MiniMap<K, V>;
122
- toJSON(): V[];
122
+ toJSON(): [K, V][];
123
123
  /**
124
124
  * Maps each item to another value into an array. Identical in behavior to
125
125
  * [Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lavalink-client",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "Easy, flexible and feature-rich lavalink@v4 Client. Both for Beginners and Proficients.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",