lavalink-client 2.1.5 → 2.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.
- package/dist/cjs/structures/Node.js +40 -37
- package/dist/cjs/structures/Player.js +1 -1
- package/dist/cjs/structures/Track.d.ts +2 -0
- package/dist/cjs/structures/Utils.d.ts +10 -5
- package/dist/esm/structures/Node.js +40 -37
- package/dist/esm/structures/Player.js +1 -1
- package/dist/esm/structures/Track.d.ts +2 -0
- package/dist/esm/structures/Utils.d.ts +10 -5
- package/dist/types/structures/Track.d.ts +2 -0
- package/dist/types/structures/Utils.d.ts +10 -5
- package/package.json +2 -2
|
@@ -143,12 +143,13 @@ class LavalinkNode {
|
|
|
143
143
|
exception: res.loadType === "error" ? res.data : null,
|
|
144
144
|
pluginInfo: res.pluginInfo || {},
|
|
145
145
|
playlist: res.loadType === "playlist" ? {
|
|
146
|
+
name: res.data.info?.name || res.data.pluginInfo?.name || null,
|
|
146
147
|
title: res.data.info?.name || res.data.pluginInfo?.name || null,
|
|
147
148
|
author: res.data.info?.author || res.data.pluginInfo?.author || null,
|
|
148
149
|
thumbnail: (res.data.info?.artworkUrl) || (res.data.pluginInfo?.artworkUrl) || ((typeof res.data?.info?.selectedTrack !== "number" || res.data?.info?.selectedTrack === -1) ? null : resTracks[res.data?.info?.selectedTrack] ? (resTracks[res.data?.info?.selectedTrack]?.info?.artworkUrl || resTracks[res.data?.info?.selectedTrack]?.info?.pluginInfo?.artworkUrl) : null) || null,
|
|
149
150
|
uri: res.data.info?.url || res.data.info?.uri || res.data.info?.link || res.data.pluginInfo?.url || res.data.pluginInfo?.uri || res.data.pluginInfo?.link || null,
|
|
150
151
|
selectedTrack: typeof res.data?.info?.selectedTrack !== "number" || res.data?.info?.selectedTrack === -1 ? null : resTracks[res.data?.info?.selectedTrack] ? this.NodeManager.LavalinkManager.utils.buildTrack(resTracks[res.data?.info?.selectedTrack], requestUser) : null,
|
|
151
|
-
duration: resTracks.length ? resTracks.reduce((acc, cur) => acc + (cur?.info?.
|
|
152
|
+
duration: resTracks.length ? resTracks.reduce((acc, cur) => acc + (cur?.info?.length || 0), 0) : 0,
|
|
152
153
|
} : null,
|
|
153
154
|
tracks: (resTracks.length ? resTracks.map(t => this.NodeManager.LavalinkManager.utils.buildTrack(t, requestUser)) : [])
|
|
154
155
|
};
|
|
@@ -541,48 +542,50 @@ class LavalinkNode {
|
|
|
541
542
|
this.stats = { ...payload };
|
|
542
543
|
break;
|
|
543
544
|
case "playerUpdate":
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
player.createdTimeStamp
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
player.
|
|
560
|
-
|
|
561
|
-
player.filterManager.filterUpdatedState
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
if (
|
|
545
|
+
{
|
|
546
|
+
const player = this.NodeManager.LavalinkManager.getPlayer(payload.guildId);
|
|
547
|
+
if (!player)
|
|
548
|
+
return;
|
|
549
|
+
const oldPlayer = player?.toJSON();
|
|
550
|
+
if (player.get("internal_updateInterval"))
|
|
551
|
+
clearInterval(player.get("internal_updateInterval"));
|
|
552
|
+
// override the position
|
|
553
|
+
player.position = payload.state.position || 0;
|
|
554
|
+
player.lastPosition = payload.state.position || 0;
|
|
555
|
+
player.connected = payload.state.connected;
|
|
556
|
+
player.ping.ws = payload.state.ping >= 0 ? payload.state.ping : player.ping.ws <= 0 && player.connected ? null : player.ping.ws || 0;
|
|
557
|
+
if (!player.createdTimeStamp && payload.state.time)
|
|
558
|
+
player.createdTimeStamp = payload.state.time;
|
|
559
|
+
if (typeof this.NodeManager.LavalinkManager.options.playerOptions.clientBasedPositionUpdateInterval === "number" && this.NodeManager.LavalinkManager.options.playerOptions.clientBasedPositionUpdateInterval >= 10) {
|
|
560
|
+
player.set("internal_updateInterval", setInterval(() => {
|
|
561
|
+
player.position += this.NodeManager.LavalinkManager.options.playerOptions.clientBasedPositionUpdateInterval || 250;
|
|
562
|
+
if (player.filterManager.filterUpdatedState >= 1) {
|
|
563
|
+
player.filterManager.filterUpdatedState++;
|
|
564
|
+
const maxMins = 8;
|
|
565
|
+
const currentDuration = player.queue.current?.info?.duration || 0;
|
|
566
|
+
if (currentDuration <= maxMins * 6e4 || (0, path_1.isAbsolute)(player.queue.current?.info?.uri)) {
|
|
567
|
+
if (player.filterManager.filterUpdatedState >= ((this.NodeManager.LavalinkManager.options.playerOptions.clientBasedPositionUpdateInterval || 250) > 400 ? 2 : 3)) {
|
|
568
|
+
player.filterManager.filterUpdatedState = 0;
|
|
569
|
+
player.seek(player.position);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
else {
|
|
566
573
|
player.filterManager.filterUpdatedState = 0;
|
|
567
|
-
player.seek(player.position);
|
|
568
574
|
}
|
|
569
575
|
}
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
576
|
+
}, this.NodeManager.LavalinkManager.options.playerOptions.clientBasedPositionUpdateInterval || 250));
|
|
577
|
+
}
|
|
578
|
+
else {
|
|
579
|
+
if (player.filterManager.filterUpdatedState >= 1) { // if no interval but instafix available, findable via the "filterUpdatedState" property
|
|
580
|
+
const maxMins = 8;
|
|
581
|
+
const currentDuration = player.queue.current?.info?.duration || 0;
|
|
582
|
+
if (currentDuration <= maxMins * 6e4 || (0, path_1.isAbsolute)(player.queue.current?.info?.uri))
|
|
583
|
+
player.seek(player.position);
|
|
584
|
+
player.filterManager.filterUpdatedState = 0;
|
|
573
585
|
}
|
|
574
|
-
}, this.NodeManager.LavalinkManager.options.playerOptions.clientBasedPositionUpdateInterval || 250));
|
|
575
|
-
}
|
|
576
|
-
else {
|
|
577
|
-
if (player.filterManager.filterUpdatedState >= 1) { // if no interval but instafix available, findable via the "filterUpdatedState" property
|
|
578
|
-
const maxMins = 8;
|
|
579
|
-
const currentDuration = player.queue.current?.info?.duration || 0;
|
|
580
|
-
if (currentDuration <= maxMins * 6e4 || (0, path_1.isAbsolute)(player.queue.current?.info?.uri))
|
|
581
|
-
player.seek(player.position);
|
|
582
|
-
player.filterManager.filterUpdatedState = 0;
|
|
583
586
|
}
|
|
587
|
+
this.NodeManager.LavalinkManager.emit("playerUpdate", oldPlayer, player);
|
|
584
588
|
}
|
|
585
|
-
this.NodeManager.LavalinkManager.emit("playerUpdate", oldPlayer, player);
|
|
586
589
|
break;
|
|
587
590
|
case "event":
|
|
588
591
|
this.handleEvent(payload);
|
|
@@ -152,7 +152,7 @@ class Player {
|
|
|
152
152
|
// handle play identifier options manually // TODO let it resolve by lavalink!
|
|
153
153
|
const res = await this.search({
|
|
154
154
|
query: options?.track?.identifier
|
|
155
|
-
}, options?.track?.
|
|
155
|
+
}, options?.track?.requester || this.queue?.current?.requester || this.queue.previous?.[0]?.requester || this.queue.tracks?.[0]?.requester || this.LavalinkManager.options.client);
|
|
156
156
|
if (typeof options.track.userData === "object")
|
|
157
157
|
res.tracks[0].userData = { ...(res.tracks[0].userData || {}), ...(options.track.userData || {}) };
|
|
158
158
|
if (res.tracks[0]) {
|
|
@@ -55,6 +55,8 @@ export interface PluginInfo {
|
|
|
55
55
|
type?: "album" | "playlist" | "artist" | "recommendations" | string;
|
|
56
56
|
/** The Identifier provided by a plugin */
|
|
57
57
|
albumName?: string;
|
|
58
|
+
/** The url of the album */
|
|
59
|
+
albumUrl?: string;
|
|
58
60
|
/** The url of the album art */
|
|
59
61
|
albumArtUrl?: string;
|
|
60
62
|
/** The url of the artist */
|
|
@@ -24,13 +24,13 @@ export type ClientSearchPlatform = ClientCustomSearchPlatformUtils | // for file
|
|
|
24
24
|
export type SearchPlatform = LavalinkSearchPlatform | ClientSearchPlatform;
|
|
25
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";
|
|
26
26
|
export interface PlaylistInfo {
|
|
27
|
-
/** The playlist
|
|
28
|
-
title: string;
|
|
29
|
-
/** The playlist name (if provided instead of title) */
|
|
27
|
+
/** The playlist name */
|
|
30
28
|
name: string;
|
|
31
|
-
/** The
|
|
29
|
+
/** The playlist title (same as name) */
|
|
30
|
+
title: string;
|
|
31
|
+
/** The playlist Author */
|
|
32
32
|
author?: string;
|
|
33
|
-
/** The
|
|
33
|
+
/** The playlist Thumbnail */
|
|
34
34
|
thumbnail?: string;
|
|
35
35
|
/** A Uri to the playlist */
|
|
36
36
|
uri?: string;
|
|
@@ -168,8 +168,13 @@ export declare class MiniMap<K, V> extends Map<K, V> {
|
|
|
168
168
|
export type PlayerEvents = TrackStartEvent | TrackEndEvent | TrackStuckEvent | TrackExceptionEvent | WebSocketClosedEvent | SponsorBlockSegmentEvents;
|
|
169
169
|
export type Severity = "COMMON" | "SUSPICIOUS" | "FAULT";
|
|
170
170
|
export interface Exception {
|
|
171
|
+
/** Severity of the error */
|
|
171
172
|
severity: Severity;
|
|
173
|
+
/** Nodejs Error */
|
|
174
|
+
error?: Error;
|
|
175
|
+
/** Message by lavalink */
|
|
172
176
|
message: string;
|
|
177
|
+
/** Cause by lavalink */
|
|
173
178
|
cause: string;
|
|
174
179
|
}
|
|
175
180
|
export interface PlayerEvent {
|
|
@@ -139,12 +139,13 @@ export class LavalinkNode {
|
|
|
139
139
|
exception: res.loadType === "error" ? res.data : null,
|
|
140
140
|
pluginInfo: res.pluginInfo || {},
|
|
141
141
|
playlist: res.loadType === "playlist" ? {
|
|
142
|
+
name: res.data.info?.name || res.data.pluginInfo?.name || null,
|
|
142
143
|
title: res.data.info?.name || res.data.pluginInfo?.name || null,
|
|
143
144
|
author: res.data.info?.author || res.data.pluginInfo?.author || null,
|
|
144
145
|
thumbnail: (res.data.info?.artworkUrl) || (res.data.pluginInfo?.artworkUrl) || ((typeof res.data?.info?.selectedTrack !== "number" || res.data?.info?.selectedTrack === -1) ? null : resTracks[res.data?.info?.selectedTrack] ? (resTracks[res.data?.info?.selectedTrack]?.info?.artworkUrl || resTracks[res.data?.info?.selectedTrack]?.info?.pluginInfo?.artworkUrl) : null) || null,
|
|
145
146
|
uri: res.data.info?.url || res.data.info?.uri || res.data.info?.link || res.data.pluginInfo?.url || res.data.pluginInfo?.uri || res.data.pluginInfo?.link || null,
|
|
146
147
|
selectedTrack: typeof res.data?.info?.selectedTrack !== "number" || res.data?.info?.selectedTrack === -1 ? null : resTracks[res.data?.info?.selectedTrack] ? this.NodeManager.LavalinkManager.utils.buildTrack(resTracks[res.data?.info?.selectedTrack], requestUser) : null,
|
|
147
|
-
duration: resTracks.length ? resTracks.reduce((acc, cur) => acc + (cur?.info?.
|
|
148
|
+
duration: resTracks.length ? resTracks.reduce((acc, cur) => acc + (cur?.info?.length || 0), 0) : 0,
|
|
148
149
|
} : null,
|
|
149
150
|
tracks: (resTracks.length ? resTracks.map(t => this.NodeManager.LavalinkManager.utils.buildTrack(t, requestUser)) : [])
|
|
150
151
|
};
|
|
@@ -537,48 +538,50 @@ export class LavalinkNode {
|
|
|
537
538
|
this.stats = { ...payload };
|
|
538
539
|
break;
|
|
539
540
|
case "playerUpdate":
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
player.createdTimeStamp
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
player.
|
|
556
|
-
|
|
557
|
-
player.filterManager.filterUpdatedState
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
if (
|
|
541
|
+
{
|
|
542
|
+
const player = this.NodeManager.LavalinkManager.getPlayer(payload.guildId);
|
|
543
|
+
if (!player)
|
|
544
|
+
return;
|
|
545
|
+
const oldPlayer = player?.toJSON();
|
|
546
|
+
if (player.get("internal_updateInterval"))
|
|
547
|
+
clearInterval(player.get("internal_updateInterval"));
|
|
548
|
+
// override the position
|
|
549
|
+
player.position = payload.state.position || 0;
|
|
550
|
+
player.lastPosition = payload.state.position || 0;
|
|
551
|
+
player.connected = payload.state.connected;
|
|
552
|
+
player.ping.ws = payload.state.ping >= 0 ? payload.state.ping : player.ping.ws <= 0 && player.connected ? null : player.ping.ws || 0;
|
|
553
|
+
if (!player.createdTimeStamp && payload.state.time)
|
|
554
|
+
player.createdTimeStamp = payload.state.time;
|
|
555
|
+
if (typeof this.NodeManager.LavalinkManager.options.playerOptions.clientBasedPositionUpdateInterval === "number" && this.NodeManager.LavalinkManager.options.playerOptions.clientBasedPositionUpdateInterval >= 10) {
|
|
556
|
+
player.set("internal_updateInterval", setInterval(() => {
|
|
557
|
+
player.position += this.NodeManager.LavalinkManager.options.playerOptions.clientBasedPositionUpdateInterval || 250;
|
|
558
|
+
if (player.filterManager.filterUpdatedState >= 1) {
|
|
559
|
+
player.filterManager.filterUpdatedState++;
|
|
560
|
+
const maxMins = 8;
|
|
561
|
+
const currentDuration = player.queue.current?.info?.duration || 0;
|
|
562
|
+
if (currentDuration <= maxMins * 6e4 || isAbsolute(player.queue.current?.info?.uri)) {
|
|
563
|
+
if (player.filterManager.filterUpdatedState >= ((this.NodeManager.LavalinkManager.options.playerOptions.clientBasedPositionUpdateInterval || 250) > 400 ? 2 : 3)) {
|
|
564
|
+
player.filterManager.filterUpdatedState = 0;
|
|
565
|
+
player.seek(player.position);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
else {
|
|
562
569
|
player.filterManager.filterUpdatedState = 0;
|
|
563
|
-
player.seek(player.position);
|
|
564
570
|
}
|
|
565
571
|
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
572
|
+
}, this.NodeManager.LavalinkManager.options.playerOptions.clientBasedPositionUpdateInterval || 250));
|
|
573
|
+
}
|
|
574
|
+
else {
|
|
575
|
+
if (player.filterManager.filterUpdatedState >= 1) { // if no interval but instafix available, findable via the "filterUpdatedState" property
|
|
576
|
+
const maxMins = 8;
|
|
577
|
+
const currentDuration = player.queue.current?.info?.duration || 0;
|
|
578
|
+
if (currentDuration <= maxMins * 6e4 || isAbsolute(player.queue.current?.info?.uri))
|
|
579
|
+
player.seek(player.position);
|
|
580
|
+
player.filterManager.filterUpdatedState = 0;
|
|
569
581
|
}
|
|
570
|
-
}, this.NodeManager.LavalinkManager.options.playerOptions.clientBasedPositionUpdateInterval || 250));
|
|
571
|
-
}
|
|
572
|
-
else {
|
|
573
|
-
if (player.filterManager.filterUpdatedState >= 1) { // if no interval but instafix available, findable via the "filterUpdatedState" property
|
|
574
|
-
const maxMins = 8;
|
|
575
|
-
const currentDuration = player.queue.current?.info?.duration || 0;
|
|
576
|
-
if (currentDuration <= maxMins * 6e4 || isAbsolute(player.queue.current?.info?.uri))
|
|
577
|
-
player.seek(player.position);
|
|
578
|
-
player.filterManager.filterUpdatedState = 0;
|
|
579
582
|
}
|
|
583
|
+
this.NodeManager.LavalinkManager.emit("playerUpdate", oldPlayer, player);
|
|
580
584
|
}
|
|
581
|
-
this.NodeManager.LavalinkManager.emit("playerUpdate", oldPlayer, player);
|
|
582
585
|
break;
|
|
583
586
|
case "event":
|
|
584
587
|
this.handleEvent(payload);
|
|
@@ -149,7 +149,7 @@ export class Player {
|
|
|
149
149
|
// handle play identifier options manually // TODO let it resolve by lavalink!
|
|
150
150
|
const res = await this.search({
|
|
151
151
|
query: options?.track?.identifier
|
|
152
|
-
}, options?.track?.
|
|
152
|
+
}, options?.track?.requester || this.queue?.current?.requester || this.queue.previous?.[0]?.requester || this.queue.tracks?.[0]?.requester || this.LavalinkManager.options.client);
|
|
153
153
|
if (typeof options.track.userData === "object")
|
|
154
154
|
res.tracks[0].userData = { ...(res.tracks[0].userData || {}), ...(options.track.userData || {}) };
|
|
155
155
|
if (res.tracks[0]) {
|
|
@@ -55,6 +55,8 @@ export interface PluginInfo {
|
|
|
55
55
|
type?: "album" | "playlist" | "artist" | "recommendations" | string;
|
|
56
56
|
/** The Identifier provided by a plugin */
|
|
57
57
|
albumName?: string;
|
|
58
|
+
/** The url of the album */
|
|
59
|
+
albumUrl?: string;
|
|
58
60
|
/** The url of the album art */
|
|
59
61
|
albumArtUrl?: string;
|
|
60
62
|
/** The url of the artist */
|
|
@@ -24,13 +24,13 @@ export type ClientSearchPlatform = ClientCustomSearchPlatformUtils | // for file
|
|
|
24
24
|
export type SearchPlatform = LavalinkSearchPlatform | ClientSearchPlatform;
|
|
25
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";
|
|
26
26
|
export interface PlaylistInfo {
|
|
27
|
-
/** The playlist
|
|
28
|
-
title: string;
|
|
29
|
-
/** The playlist name (if provided instead of title) */
|
|
27
|
+
/** The playlist name */
|
|
30
28
|
name: string;
|
|
31
|
-
/** The
|
|
29
|
+
/** The playlist title (same as name) */
|
|
30
|
+
title: string;
|
|
31
|
+
/** The playlist Author */
|
|
32
32
|
author?: string;
|
|
33
|
-
/** The
|
|
33
|
+
/** The playlist Thumbnail */
|
|
34
34
|
thumbnail?: string;
|
|
35
35
|
/** A Uri to the playlist */
|
|
36
36
|
uri?: string;
|
|
@@ -168,8 +168,13 @@ export declare class MiniMap<K, V> extends Map<K, V> {
|
|
|
168
168
|
export type PlayerEvents = TrackStartEvent | TrackEndEvent | TrackStuckEvent | TrackExceptionEvent | WebSocketClosedEvent | SponsorBlockSegmentEvents;
|
|
169
169
|
export type Severity = "COMMON" | "SUSPICIOUS" | "FAULT";
|
|
170
170
|
export interface Exception {
|
|
171
|
+
/** Severity of the error */
|
|
171
172
|
severity: Severity;
|
|
173
|
+
/** Nodejs Error */
|
|
174
|
+
error?: Error;
|
|
175
|
+
/** Message by lavalink */
|
|
172
176
|
message: string;
|
|
177
|
+
/** Cause by lavalink */
|
|
173
178
|
cause: string;
|
|
174
179
|
}
|
|
175
180
|
export interface PlayerEvent {
|
|
@@ -55,6 +55,8 @@ export interface PluginInfo {
|
|
|
55
55
|
type?: "album" | "playlist" | "artist" | "recommendations" | string;
|
|
56
56
|
/** The Identifier provided by a plugin */
|
|
57
57
|
albumName?: string;
|
|
58
|
+
/** The url of the album */
|
|
59
|
+
albumUrl?: string;
|
|
58
60
|
/** The url of the album art */
|
|
59
61
|
albumArtUrl?: string;
|
|
60
62
|
/** The url of the artist */
|
|
@@ -24,13 +24,13 @@ export type ClientSearchPlatform = ClientCustomSearchPlatformUtils | // for file
|
|
|
24
24
|
export type SearchPlatform = LavalinkSearchPlatform | ClientSearchPlatform;
|
|
25
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";
|
|
26
26
|
export interface PlaylistInfo {
|
|
27
|
-
/** The playlist
|
|
28
|
-
title: string;
|
|
29
|
-
/** The playlist name (if provided instead of title) */
|
|
27
|
+
/** The playlist name */
|
|
30
28
|
name: string;
|
|
31
|
-
/** The
|
|
29
|
+
/** The playlist title (same as name) */
|
|
30
|
+
title: string;
|
|
31
|
+
/** The playlist Author */
|
|
32
32
|
author?: string;
|
|
33
|
-
/** The
|
|
33
|
+
/** The playlist Thumbnail */
|
|
34
34
|
thumbnail?: string;
|
|
35
35
|
/** A Uri to the playlist */
|
|
36
36
|
uri?: string;
|
|
@@ -168,8 +168,13 @@ export declare class MiniMap<K, V> extends Map<K, V> {
|
|
|
168
168
|
export type PlayerEvents = TrackStartEvent | TrackEndEvent | TrackStuckEvent | TrackExceptionEvent | WebSocketClosedEvent | SponsorBlockSegmentEvents;
|
|
169
169
|
export type Severity = "COMMON" | "SUSPICIOUS" | "FAULT";
|
|
170
170
|
export interface Exception {
|
|
171
|
+
/** Severity of the error */
|
|
171
172
|
severity: Severity;
|
|
173
|
+
/** Nodejs Error */
|
|
174
|
+
error?: Error;
|
|
175
|
+
/** Message by lavalink */
|
|
172
176
|
message: string;
|
|
177
|
+
/** Cause by lavalink */
|
|
173
178
|
cause: string;
|
|
174
179
|
}
|
|
175
180
|
export interface PlayerEvent {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lavalink-client",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.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",
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
"@typescript-eslint/parser": "^6.4.0",
|
|
55
55
|
"eslint": "^8.47.0",
|
|
56
56
|
"ts-loader": "^9.4.4",
|
|
57
|
-
"tslib": "^2.6.1",
|
|
58
57
|
"typedoc": "^0.25.4",
|
|
59
58
|
"typedoc-theme-hierarchy": "^4.1.2",
|
|
60
59
|
"typescript": "^5.1.6"
|
|
61
60
|
},
|
|
62
61
|
"dependencies": {
|
|
63
62
|
"undici": "^5.23.0",
|
|
63
|
+
"tslib": "^2.6.1",
|
|
64
64
|
"ws": "^8.13.0"
|
|
65
65
|
}
|
|
66
66
|
}
|