lavalink-client 2.6.1 → 2.6.2
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 +4 -4
- package/dist/index.d.mts +8 -9
- package/dist/index.d.ts +8 -9
- package/dist/index.js +22 -2
- package/dist/index.mjs +22 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<div style="font-family: Arial, sans-serif; border: 1px solid #
|
|
1
|
+
<div style="font-family: Arial, sans-serif; border: 1px solid #fab788; border-radius: 15px; padding: 25px; ">
|
|
2
2
|
|
|
3
|
-
<h1 align="center" style="color: #
|
|
3
|
+
<h1 align="center" style="color: #fab788; border-bottom: 2px solid #3498db; padding-bottom: 10px;">Lavalink Client</h1>
|
|
4
4
|
<p align="center" style="font-size: 1.2em; color: #555;">An easy, flexible, and feature-rich Lavalink v4 Client for both beginners and experts.</p>
|
|
5
5
|
|
|
6
6
|
<div align="center">
|
|
@@ -421,7 +421,7 @@ client.lavalink.on("playerDestroy", (player) => {
|
|
|
421
421
|
Lavalink client supports most of the major lavalink-plugins.
|
|
422
422
|
The client itself is - for beginner friendly reasons - atm not extendable (via plugins)
|
|
423
423
|
You can just use the built in functions (sponsor block, lyrics) or search plattforms (deezer, spotify, apple music, youtube, ...) and use the lavalink-plugins without any configuration on the client side.
|
|
424
|
-
|
|
424
|
+
|
|
425
425
|
Some plugins require extra-parameters, such as flowerytts:
|
|
426
426
|
Pass extra parameters to the search function to use plugin-specific features.
|
|
427
427
|
|
|
@@ -455,4 +455,4 @@ if (response.tracks.length > 0) {
|
|
|
455
455
|
```
|
|
456
456
|
</details>
|
|
457
457
|
|
|
458
|
-
</div>
|
|
458
|
+
</div>
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import internal from 'stream';
|
|
3
2
|
|
|
4
3
|
/** The Audio Outputs type */
|
|
5
4
|
type AudioOutputs = "mono" | "stereo" | "left" | "right";
|
|
@@ -452,7 +451,7 @@ declare class FilterManager {
|
|
|
452
451
|
/** Sourcenames provided by lavalink server */
|
|
453
452
|
type LavalinkSourceNames = "youtube" | "youtubemusic" | "soundcloud" | "bandcamp" | "twitch";
|
|
454
453
|
/** Source Names provided by lava src plugin */
|
|
455
|
-
type LavalinkPlugin_LavaSrc_SourceNames = "deezer" | "spotify" | "applemusic" | "yandexmusic" | "flowery-tts" | "vkmusic" | "tidal" | "qobuz";
|
|
454
|
+
type LavalinkPlugin_LavaSrc_SourceNames = "deezer" | "spotify" | "applemusic" | "yandexmusic" | "flowery-tts" | "vkmusic" | "tidal" | "qobuz" | "pandora";
|
|
456
455
|
/** Source Names provided by jiosaavan plugin */
|
|
457
456
|
type LavalinkPlugin_JioSaavn_SourceNames = "jiosaavn";
|
|
458
457
|
/** The SourceNames provided by lavalink */
|
|
@@ -627,7 +626,7 @@ declare class DefaultQueueStore implements QueueStoreManager {
|
|
|
627
626
|
* @param guildId The guild ID
|
|
628
627
|
* @returns The queue for the guild
|
|
629
628
|
*/
|
|
630
|
-
get(guildId: string): StoredQueue;
|
|
629
|
+
get(guildId: string): StoredQueue | undefined;
|
|
631
630
|
/**
|
|
632
631
|
* Set the queue for a guild
|
|
633
632
|
* @param guildId The guild ID
|
|
@@ -1001,7 +1000,7 @@ interface StoredQueue {
|
|
|
1001
1000
|
}
|
|
1002
1001
|
interface QueueStoreManager {
|
|
1003
1002
|
/** @async get a Value (MUST RETURN UNPARSED!) */
|
|
1004
|
-
get: (guildId: string) => Awaitable<StoredQueue | string>;
|
|
1003
|
+
get: (guildId: string) => Awaitable<StoredQueue | string | undefined>;
|
|
1005
1004
|
/** @async Set a value inside a guildId (MUST BE UNPARSED) */
|
|
1006
1005
|
set: (guildId: string, value: StoredQueue | string) => Awaitable<void | boolean>;
|
|
1007
1006
|
/** @async Delete a Database Value based of it's guildId */
|
|
@@ -1170,7 +1169,7 @@ interface LavalinkNodeOptions {
|
|
|
1170
1169
|
/** Close on error */
|
|
1171
1170
|
closeOnError?: boolean;
|
|
1172
1171
|
/** Heartbeat interval , set to <= 0 to disable heartbeat system */
|
|
1173
|
-
heartBeatInterval?:
|
|
1172
|
+
heartBeatInterval?: number;
|
|
1174
1173
|
/** Recommended, to check wether the client is still connected or not on the stats endpoint */
|
|
1175
1174
|
enablePingOnStatsCheck?: boolean;
|
|
1176
1175
|
}
|
|
@@ -1265,7 +1264,7 @@ interface VersionObject {
|
|
|
1265
1264
|
/** The minor version of this Lavalink server */
|
|
1266
1265
|
minor: number;
|
|
1267
1266
|
/** The patch version of this Lavalink server */
|
|
1268
|
-
patch:
|
|
1267
|
+
patch: number;
|
|
1269
1268
|
/** The pre-release version according to semver as a . separated list of identifiers */
|
|
1270
1269
|
preRelease?: string;
|
|
1271
1270
|
/** The build metadata according to semver as a . separated list of identifiers */
|
|
@@ -1490,7 +1489,7 @@ type Opaque<T, K> = T & {
|
|
|
1490
1489
|
type IntegerNumber = Opaque<number, 'Int'>;
|
|
1491
1490
|
/** Opqaue tyep for floatnumber */
|
|
1492
1491
|
type FloatNumber = Opaque<number, 'Float'>;
|
|
1493
|
-
type LavaSrcSearchPlatformBase = "spsearch" | "sprec" | "amsearch" | "dzsearch" | "dzisrc" | "dzrec" | "ymsearch" | "ymrec" | "vksearch" | "vkrec" | "tdsearch" | "tdrec" | "qbsearch" | "qbisrc" | "qbrec";
|
|
1492
|
+
type LavaSrcSearchPlatformBase = "spsearch" | "sprec" | "amsearch" | "dzsearch" | "dzisrc" | "dzrec" | "ymsearch" | "ymrec" | "vksearch" | "vkrec" | "tdsearch" | "tdrec" | "qbsearch" | "qbisrc" | "qbrec" | "pdsearch" | "pdisrc" | "pdrec";
|
|
1494
1493
|
type LavaSrcSearchPlatform = LavaSrcSearchPlatformBase | "ftts";
|
|
1495
1494
|
type JioSaavnSearchPlatform = "jssearch" | "jsrec";
|
|
1496
1495
|
type DuncteSearchPlatform = "speak" | "phsearch" | "pornhub" | "porn" | "tts";
|
|
@@ -1499,9 +1498,9 @@ type LavalinkClientSearchPlatformResolve = "bandcamp" | "bc";
|
|
|
1499
1498
|
type LavalinkSearchPlatform = "ytsearch" | "ytmsearch" | "scsearch" | "bcsearch" | LavaSrcSearchPlatform | DuncteSearchPlatform | JioSaavnSearchPlatform | LavalinkClientSearchPlatform;
|
|
1500
1499
|
type ClientCustomSearchPlatformUtils = "local" | "http" | "https" | "link" | "uri";
|
|
1501
1500
|
type ClientSearchPlatform = ClientCustomSearchPlatformUtils | // for file/link requests
|
|
1502
|
-
"youtube" | "yt" | "youtube music" | "youtubemusic" | "ytm" | "musicyoutube" | "music youtube" | "soundcloud" | "sc" | "am" | "apple music" | "applemusic" | "apple" | "musicapple" | "music apple" | "sp" | "spsuggestion" | "spotify" | "spotify.com" | "spotifycom" | "dz" | "deezer" | "yandex" | "yandex music" | "yandexmusic" | "vk" | "vk music" | "vkmusic" | "tidal" | "tidal music" | "qobuz" | "flowerytts" | "flowery" | "flowery.tts" | LavalinkClientSearchPlatformResolve | LavalinkClientSearchPlatform | "js" | "jiosaavn" | "td" | "tidal" | "tdrec";
|
|
1501
|
+
"youtube" | "yt" | "youtube music" | "youtubemusic" | "ytm" | "musicyoutube" | "music youtube" | "soundcloud" | "sc" | "am" | "apple music" | "applemusic" | "apple" | "musicapple" | "music apple" | "sp" | "spsuggestion" | "spotify" | "spotify.com" | "spotifycom" | "dz" | "deezer" | "yandex" | "yandex music" | "yandexmusic" | "vk" | "vk music" | "vkmusic" | "tidal" | "tidal music" | "qobuz" | "pandora" | "pd" | "pandora music" | "pandoramusic" | "flowerytts" | "flowery" | "flowery.tts" | LavalinkClientSearchPlatformResolve | LavalinkClientSearchPlatform | "js" | "jiosaavn" | "td" | "tidal" | "tdrec";
|
|
1503
1502
|
type SearchPlatform = LavalinkSearchPlatform | ClientSearchPlatform;
|
|
1504
|
-
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" | "jiosaavn" | "appleMusic" | "tidal" | "TwitchTv" | "vimeo";
|
|
1503
|
+
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" | "jiosaavn" | "appleMusic" | "tidal" | "PandoraTrackRegex" | "PandoraAlbumRegex" | "PandoraArtistRegex" | "PandoraPlaylistRegex" | "AllPandoraRegex" | "TwitchTv" | "vimeo";
|
|
1505
1504
|
interface PlaylistInfo {
|
|
1506
1505
|
/** The playlist name */
|
|
1507
1506
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import internal from 'stream';
|
|
3
2
|
|
|
4
3
|
/** The Audio Outputs type */
|
|
5
4
|
type AudioOutputs = "mono" | "stereo" | "left" | "right";
|
|
@@ -452,7 +451,7 @@ declare class FilterManager {
|
|
|
452
451
|
/** Sourcenames provided by lavalink server */
|
|
453
452
|
type LavalinkSourceNames = "youtube" | "youtubemusic" | "soundcloud" | "bandcamp" | "twitch";
|
|
454
453
|
/** Source Names provided by lava src plugin */
|
|
455
|
-
type LavalinkPlugin_LavaSrc_SourceNames = "deezer" | "spotify" | "applemusic" | "yandexmusic" | "flowery-tts" | "vkmusic" | "tidal" | "qobuz";
|
|
454
|
+
type LavalinkPlugin_LavaSrc_SourceNames = "deezer" | "spotify" | "applemusic" | "yandexmusic" | "flowery-tts" | "vkmusic" | "tidal" | "qobuz" | "pandora";
|
|
456
455
|
/** Source Names provided by jiosaavan plugin */
|
|
457
456
|
type LavalinkPlugin_JioSaavn_SourceNames = "jiosaavn";
|
|
458
457
|
/** The SourceNames provided by lavalink */
|
|
@@ -627,7 +626,7 @@ declare class DefaultQueueStore implements QueueStoreManager {
|
|
|
627
626
|
* @param guildId The guild ID
|
|
628
627
|
* @returns The queue for the guild
|
|
629
628
|
*/
|
|
630
|
-
get(guildId: string): StoredQueue;
|
|
629
|
+
get(guildId: string): StoredQueue | undefined;
|
|
631
630
|
/**
|
|
632
631
|
* Set the queue for a guild
|
|
633
632
|
* @param guildId The guild ID
|
|
@@ -1001,7 +1000,7 @@ interface StoredQueue {
|
|
|
1001
1000
|
}
|
|
1002
1001
|
interface QueueStoreManager {
|
|
1003
1002
|
/** @async get a Value (MUST RETURN UNPARSED!) */
|
|
1004
|
-
get: (guildId: string) => Awaitable<StoredQueue | string>;
|
|
1003
|
+
get: (guildId: string) => Awaitable<StoredQueue | string | undefined>;
|
|
1005
1004
|
/** @async Set a value inside a guildId (MUST BE UNPARSED) */
|
|
1006
1005
|
set: (guildId: string, value: StoredQueue | string) => Awaitable<void | boolean>;
|
|
1007
1006
|
/** @async Delete a Database Value based of it's guildId */
|
|
@@ -1170,7 +1169,7 @@ interface LavalinkNodeOptions {
|
|
|
1170
1169
|
/** Close on error */
|
|
1171
1170
|
closeOnError?: boolean;
|
|
1172
1171
|
/** Heartbeat interval , set to <= 0 to disable heartbeat system */
|
|
1173
|
-
heartBeatInterval?:
|
|
1172
|
+
heartBeatInterval?: number;
|
|
1174
1173
|
/** Recommended, to check wether the client is still connected or not on the stats endpoint */
|
|
1175
1174
|
enablePingOnStatsCheck?: boolean;
|
|
1176
1175
|
}
|
|
@@ -1265,7 +1264,7 @@ interface VersionObject {
|
|
|
1265
1264
|
/** The minor version of this Lavalink server */
|
|
1266
1265
|
minor: number;
|
|
1267
1266
|
/** The patch version of this Lavalink server */
|
|
1268
|
-
patch:
|
|
1267
|
+
patch: number;
|
|
1269
1268
|
/** The pre-release version according to semver as a . separated list of identifiers */
|
|
1270
1269
|
preRelease?: string;
|
|
1271
1270
|
/** The build metadata according to semver as a . separated list of identifiers */
|
|
@@ -1490,7 +1489,7 @@ type Opaque<T, K> = T & {
|
|
|
1490
1489
|
type IntegerNumber = Opaque<number, 'Int'>;
|
|
1491
1490
|
/** Opqaue tyep for floatnumber */
|
|
1492
1491
|
type FloatNumber = Opaque<number, 'Float'>;
|
|
1493
|
-
type LavaSrcSearchPlatformBase = "spsearch" | "sprec" | "amsearch" | "dzsearch" | "dzisrc" | "dzrec" | "ymsearch" | "ymrec" | "vksearch" | "vkrec" | "tdsearch" | "tdrec" | "qbsearch" | "qbisrc" | "qbrec";
|
|
1492
|
+
type LavaSrcSearchPlatformBase = "spsearch" | "sprec" | "amsearch" | "dzsearch" | "dzisrc" | "dzrec" | "ymsearch" | "ymrec" | "vksearch" | "vkrec" | "tdsearch" | "tdrec" | "qbsearch" | "qbisrc" | "qbrec" | "pdsearch" | "pdisrc" | "pdrec";
|
|
1494
1493
|
type LavaSrcSearchPlatform = LavaSrcSearchPlatformBase | "ftts";
|
|
1495
1494
|
type JioSaavnSearchPlatform = "jssearch" | "jsrec";
|
|
1496
1495
|
type DuncteSearchPlatform = "speak" | "phsearch" | "pornhub" | "porn" | "tts";
|
|
@@ -1499,9 +1498,9 @@ type LavalinkClientSearchPlatformResolve = "bandcamp" | "bc";
|
|
|
1499
1498
|
type LavalinkSearchPlatform = "ytsearch" | "ytmsearch" | "scsearch" | "bcsearch" | LavaSrcSearchPlatform | DuncteSearchPlatform | JioSaavnSearchPlatform | LavalinkClientSearchPlatform;
|
|
1500
1499
|
type ClientCustomSearchPlatformUtils = "local" | "http" | "https" | "link" | "uri";
|
|
1501
1500
|
type ClientSearchPlatform = ClientCustomSearchPlatformUtils | // for file/link requests
|
|
1502
|
-
"youtube" | "yt" | "youtube music" | "youtubemusic" | "ytm" | "musicyoutube" | "music youtube" | "soundcloud" | "sc" | "am" | "apple music" | "applemusic" | "apple" | "musicapple" | "music apple" | "sp" | "spsuggestion" | "spotify" | "spotify.com" | "spotifycom" | "dz" | "deezer" | "yandex" | "yandex music" | "yandexmusic" | "vk" | "vk music" | "vkmusic" | "tidal" | "tidal music" | "qobuz" | "flowerytts" | "flowery" | "flowery.tts" | LavalinkClientSearchPlatformResolve | LavalinkClientSearchPlatform | "js" | "jiosaavn" | "td" | "tidal" | "tdrec";
|
|
1501
|
+
"youtube" | "yt" | "youtube music" | "youtubemusic" | "ytm" | "musicyoutube" | "music youtube" | "soundcloud" | "sc" | "am" | "apple music" | "applemusic" | "apple" | "musicapple" | "music apple" | "sp" | "spsuggestion" | "spotify" | "spotify.com" | "spotifycom" | "dz" | "deezer" | "yandex" | "yandex music" | "yandexmusic" | "vk" | "vk music" | "vkmusic" | "tidal" | "tidal music" | "qobuz" | "pandora" | "pd" | "pandora music" | "pandoramusic" | "flowerytts" | "flowery" | "flowery.tts" | LavalinkClientSearchPlatformResolve | LavalinkClientSearchPlatform | "js" | "jiosaavn" | "td" | "tidal" | "tdrec";
|
|
1503
1502
|
type SearchPlatform = LavalinkSearchPlatform | ClientSearchPlatform;
|
|
1504
|
-
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" | "jiosaavn" | "appleMusic" | "tidal" | "TwitchTv" | "vimeo";
|
|
1503
|
+
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" | "jiosaavn" | "appleMusic" | "tidal" | "PandoraTrackRegex" | "PandoraAlbumRegex" | "PandoraArtistRegex" | "PandoraPlaylistRegex" | "AllPandoraRegex" | "TwitchTv" | "vimeo";
|
|
1505
1504
|
interface PlaylistInfo {
|
|
1506
1505
|
/** The playlist name */
|
|
1507
1506
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -426,6 +426,14 @@ var DefaultSources = {
|
|
|
426
426
|
"qobuz": "qbsearch",
|
|
427
427
|
"qbisrc": "qbisrc",
|
|
428
428
|
"qbrec": "qbrec",
|
|
429
|
+
// pandora (lavasrc)
|
|
430
|
+
"pandora": "pdsearch",
|
|
431
|
+
"pd": "pdsearch",
|
|
432
|
+
"pdsearch": "pdsearch",
|
|
433
|
+
"pdisrc": "pdisrc",
|
|
434
|
+
"pdrec": "pdrec",
|
|
435
|
+
"pandora music": "pdsearch",
|
|
436
|
+
"pandoramusic": "pdsearch",
|
|
429
437
|
// speak PLUGIN
|
|
430
438
|
"speak": "speak",
|
|
431
439
|
"tts": "tts",
|
|
@@ -508,6 +516,12 @@ var SourceLinksRegexes = {
|
|
|
508
516
|
tidal: /https?:\/\/?(?:www\.)?(?:tidal|listen)\.tidal\.com\/(?<type>track|album|playlist|artist)\/(?<identifier>[a-zA-Z0-9-_]+)/,
|
|
509
517
|
/** From jiosaavn-plugin */
|
|
510
518
|
jiosaavn: /(https?:\/\/)(www\.)?jiosaavn\.com\/(?<type>song|album|featured|artist)\/([a-zA-Z0-9-_/,]+)/,
|
|
519
|
+
/** From pandora */
|
|
520
|
+
PandoraTrackRegex: /^@?(?:https?:\/\/)?(?:www\.)?pandora\.com\/artist\/[\w\-]+(?:\/[\w\-]+)*\/(?<identifier>TR[A-Za-z0-9]+)(?:[?#].*)?$/,
|
|
521
|
+
PandoraAlbumRegex: /^@?(?:https?:\/\/)?(?:www\.)?pandora\.com\/artist\/[\w\-]+(?:\/[\w\-]+)*\/(?<identifier>AL[A-Za-z0-9]+)(?:[?#].*)?$/,
|
|
522
|
+
PandoraArtistRegex: /^@?(?:https?:\/\/)?(?:www\.)?pandora\.com\/artist\/[\w\-]+\/(?<identifier>AR[A-Za-z0-9]+)(?:[?#].*)?$/,
|
|
523
|
+
PandoraPlaylistRegex: /^@?(?:https?:\/\/)?(?:www\.)?pandora\.com\/playlist\/(?<identifier>PL:[\d:]+)(?:[?#].*)?$/,
|
|
524
|
+
AllPandoraRegex: /^@?(?:https?:\/\/)?(?:www\.)?pandora\.com\/(?:playlist\/(?<playlistId>PL:[\d:]+)|artist\/[\w\-]+(?:\/[\w\-]+)*\/(?<identifier>(?:TR|AL|AR)[A-Za-z0-9]+))(?:[?#].*)?$/,
|
|
511
525
|
/** FROM DUNCTE BOT PLUGIN */
|
|
512
526
|
tiktok: /https:\/\/www\.tiktok\.com\//,
|
|
513
527
|
mixcloud: /https:\/\/www\.mixcloud\.com\//,
|
|
@@ -768,6 +782,9 @@ var ManagerUtils = class {
|
|
|
768
782
|
if (SourceLinksRegexes.tidal.test(queryString) && !node.info?.sourceManagers?.includes("tidal")) {
|
|
769
783
|
throw new Error("Query / Link Provided for this Source but Lavalink Node has not 'tidal' enabled");
|
|
770
784
|
}
|
|
785
|
+
if (SourceLinksRegexes.AllPandoraRegex.test(queryString) && !node.info?.sourceManagers?.includes("pandora")) {
|
|
786
|
+
throw new Error("Query / Link Provided for this Source but Lavalink Node has not 'pandora' enabled");
|
|
787
|
+
}
|
|
771
788
|
return;
|
|
772
789
|
}
|
|
773
790
|
transformQuery(query) {
|
|
@@ -869,6 +886,9 @@ var ManagerUtils = class {
|
|
|
869
886
|
if (source === "qbrec" && !node.info?.sourceManagers?.includes("qobuz")) {
|
|
870
887
|
throw new Error("Lavalink Node has not 'qobuz' enabled, which is required to have 'qbrec' work");
|
|
871
888
|
}
|
|
889
|
+
if (["pdsearch", "pdisrc", "pdrec"].includes(source) && !node.info?.sourceManagers?.includes("pandora")) {
|
|
890
|
+
throw new Error("Lavalink Node has not 'pandora' enabled, which is required to have '" + source + "' work");
|
|
891
|
+
}
|
|
872
892
|
return;
|
|
873
893
|
}
|
|
874
894
|
};
|
|
@@ -1631,7 +1651,6 @@ var LavalinkNode = class {
|
|
|
1631
1651
|
subscribe: async (guildId) => {
|
|
1632
1652
|
if (!this.sessionId) throw new Error("the Lavalink-Node is either not ready, or not up to date!");
|
|
1633
1653
|
if (!this.info.plugins.find((v) => v.name === "lavalyrics-plugin")) throw new RangeError(`there is no lavalyrics-plugin available in the lavalink node (required for lyrics): ${this.id}`);
|
|
1634
|
-
if (!this.info.plugins.find((v) => v.name === "lavasrc-plugin") && !this.info.plugins.find((v) => v.name === "java-lyrics-plugin")) throw new RangeError(`there is no lyrics source (via lavasrc-plugin / java-lyrics-plugin) available in the lavalink node (required for lyrics): ${this.id}`);
|
|
1635
1654
|
return await this.request(`/sessions/${this.sessionId}/players/${guildId}/lyrics/subscribe`, (options) => {
|
|
1636
1655
|
options.method = "POST";
|
|
1637
1656
|
});
|
|
@@ -1651,7 +1670,6 @@ var LavalinkNode = class {
|
|
|
1651
1670
|
unsubscribe: async (guildId) => {
|
|
1652
1671
|
if (!this.sessionId) throw new Error("the Lavalink-Node is either not ready, or not up to date!");
|
|
1653
1672
|
if (!this.info.plugins.find((v) => v.name === "lavalyrics-plugin")) throw new RangeError(`there is no lavalyrics-plugin available in the lavalink node (required for lyrics): ${this.id}`);
|
|
1654
|
-
if (!this.info.plugins.find((v) => v.name === "lavasrc-plugin") && !this.info.plugins.find((v) => v.name === "java-lyrics-plugin")) throw new RangeError(`there is no lyrics source (via lavasrc-plugin / java-lyrics-plugin) available in the lavalink node (required for lyrics): ${this.id}`);
|
|
1655
1673
|
return await this.request(`/sessions/${this.sessionId}/players/${guildId}/lyrics/subscribe`, (options) => {
|
|
1656
1674
|
options.method = "DELETE";
|
|
1657
1675
|
});
|
|
@@ -2701,6 +2719,7 @@ var FilterManager = class {
|
|
|
2701
2719
|
};
|
|
2702
2720
|
/** The Filter Data sent to Lavalink, only if the filter is enabled (ofc.) */
|
|
2703
2721
|
data = {
|
|
2722
|
+
volume: 1,
|
|
2704
2723
|
lowPass: {
|
|
2705
2724
|
smoothing: 0
|
|
2706
2725
|
},
|
|
@@ -2954,6 +2973,7 @@ var FilterManager = class {
|
|
|
2954
2973
|
async setVolume(volume) {
|
|
2955
2974
|
if (volume < 0 || volume > 5) throw new SyntaxError("Volume-Filter must be between 0 and 5");
|
|
2956
2975
|
this.data.volume = volume;
|
|
2976
|
+
this.filters.volume = volume !== 1;
|
|
2957
2977
|
await this.applyPlayerFilters();
|
|
2958
2978
|
return this.filters.volume;
|
|
2959
2979
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -366,6 +366,14 @@ var DefaultSources = {
|
|
|
366
366
|
"qobuz": "qbsearch",
|
|
367
367
|
"qbisrc": "qbisrc",
|
|
368
368
|
"qbrec": "qbrec",
|
|
369
|
+
// pandora (lavasrc)
|
|
370
|
+
"pandora": "pdsearch",
|
|
371
|
+
"pd": "pdsearch",
|
|
372
|
+
"pdsearch": "pdsearch",
|
|
373
|
+
"pdisrc": "pdisrc",
|
|
374
|
+
"pdrec": "pdrec",
|
|
375
|
+
"pandora music": "pdsearch",
|
|
376
|
+
"pandoramusic": "pdsearch",
|
|
369
377
|
// speak PLUGIN
|
|
370
378
|
"speak": "speak",
|
|
371
379
|
"tts": "tts",
|
|
@@ -448,6 +456,12 @@ var SourceLinksRegexes = {
|
|
|
448
456
|
tidal: /https?:\/\/?(?:www\.)?(?:tidal|listen)\.tidal\.com\/(?<type>track|album|playlist|artist)\/(?<identifier>[a-zA-Z0-9-_]+)/,
|
|
449
457
|
/** From jiosaavn-plugin */
|
|
450
458
|
jiosaavn: /(https?:\/\/)(www\.)?jiosaavn\.com\/(?<type>song|album|featured|artist)\/([a-zA-Z0-9-_/,]+)/,
|
|
459
|
+
/** From pandora */
|
|
460
|
+
PandoraTrackRegex: /^@?(?:https?:\/\/)?(?:www\.)?pandora\.com\/artist\/[\w\-]+(?:\/[\w\-]+)*\/(?<identifier>TR[A-Za-z0-9]+)(?:[?#].*)?$/,
|
|
461
|
+
PandoraAlbumRegex: /^@?(?:https?:\/\/)?(?:www\.)?pandora\.com\/artist\/[\w\-]+(?:\/[\w\-]+)*\/(?<identifier>AL[A-Za-z0-9]+)(?:[?#].*)?$/,
|
|
462
|
+
PandoraArtistRegex: /^@?(?:https?:\/\/)?(?:www\.)?pandora\.com\/artist\/[\w\-]+\/(?<identifier>AR[A-Za-z0-9]+)(?:[?#].*)?$/,
|
|
463
|
+
PandoraPlaylistRegex: /^@?(?:https?:\/\/)?(?:www\.)?pandora\.com\/playlist\/(?<identifier>PL:[\d:]+)(?:[?#].*)?$/,
|
|
464
|
+
AllPandoraRegex: /^@?(?:https?:\/\/)?(?:www\.)?pandora\.com\/(?:playlist\/(?<playlistId>PL:[\d:]+)|artist\/[\w\-]+(?:\/[\w\-]+)*\/(?<identifier>(?:TR|AL|AR)[A-Za-z0-9]+))(?:[?#].*)?$/,
|
|
451
465
|
/** FROM DUNCTE BOT PLUGIN */
|
|
452
466
|
tiktok: /https:\/\/www\.tiktok\.com\//,
|
|
453
467
|
mixcloud: /https:\/\/www\.mixcloud\.com\//,
|
|
@@ -708,6 +722,9 @@ var ManagerUtils = class {
|
|
|
708
722
|
if (SourceLinksRegexes.tidal.test(queryString) && !node.info?.sourceManagers?.includes("tidal")) {
|
|
709
723
|
throw new Error("Query / Link Provided for this Source but Lavalink Node has not 'tidal' enabled");
|
|
710
724
|
}
|
|
725
|
+
if (SourceLinksRegexes.AllPandoraRegex.test(queryString) && !node.info?.sourceManagers?.includes("pandora")) {
|
|
726
|
+
throw new Error("Query / Link Provided for this Source but Lavalink Node has not 'pandora' enabled");
|
|
727
|
+
}
|
|
711
728
|
return;
|
|
712
729
|
}
|
|
713
730
|
transformQuery(query) {
|
|
@@ -809,6 +826,9 @@ var ManagerUtils = class {
|
|
|
809
826
|
if (source === "qbrec" && !node.info?.sourceManagers?.includes("qobuz")) {
|
|
810
827
|
throw new Error("Lavalink Node has not 'qobuz' enabled, which is required to have 'qbrec' work");
|
|
811
828
|
}
|
|
829
|
+
if (["pdsearch", "pdisrc", "pdrec"].includes(source) && !node.info?.sourceManagers?.includes("pandora")) {
|
|
830
|
+
throw new Error("Lavalink Node has not 'pandora' enabled, which is required to have '" + source + "' work");
|
|
831
|
+
}
|
|
812
832
|
return;
|
|
813
833
|
}
|
|
814
834
|
};
|
|
@@ -1571,7 +1591,6 @@ var LavalinkNode = class {
|
|
|
1571
1591
|
subscribe: async (guildId) => {
|
|
1572
1592
|
if (!this.sessionId) throw new Error("the Lavalink-Node is either not ready, or not up to date!");
|
|
1573
1593
|
if (!this.info.plugins.find((v) => v.name === "lavalyrics-plugin")) throw new RangeError(`there is no lavalyrics-plugin available in the lavalink node (required for lyrics): ${this.id}`);
|
|
1574
|
-
if (!this.info.plugins.find((v) => v.name === "lavasrc-plugin") && !this.info.plugins.find((v) => v.name === "java-lyrics-plugin")) throw new RangeError(`there is no lyrics source (via lavasrc-plugin / java-lyrics-plugin) available in the lavalink node (required for lyrics): ${this.id}`);
|
|
1575
1594
|
return await this.request(`/sessions/${this.sessionId}/players/${guildId}/lyrics/subscribe`, (options) => {
|
|
1576
1595
|
options.method = "POST";
|
|
1577
1596
|
});
|
|
@@ -1591,7 +1610,6 @@ var LavalinkNode = class {
|
|
|
1591
1610
|
unsubscribe: async (guildId) => {
|
|
1592
1611
|
if (!this.sessionId) throw new Error("the Lavalink-Node is either not ready, or not up to date!");
|
|
1593
1612
|
if (!this.info.plugins.find((v) => v.name === "lavalyrics-plugin")) throw new RangeError(`there is no lavalyrics-plugin available in the lavalink node (required for lyrics): ${this.id}`);
|
|
1594
|
-
if (!this.info.plugins.find((v) => v.name === "lavasrc-plugin") && !this.info.plugins.find((v) => v.name === "java-lyrics-plugin")) throw new RangeError(`there is no lyrics source (via lavasrc-plugin / java-lyrics-plugin) available in the lavalink node (required for lyrics): ${this.id}`);
|
|
1595
1613
|
return await this.request(`/sessions/${this.sessionId}/players/${guildId}/lyrics/subscribe`, (options) => {
|
|
1596
1614
|
options.method = "DELETE";
|
|
1597
1615
|
});
|
|
@@ -2641,6 +2659,7 @@ var FilterManager = class {
|
|
|
2641
2659
|
};
|
|
2642
2660
|
/** The Filter Data sent to Lavalink, only if the filter is enabled (ofc.) */
|
|
2643
2661
|
data = {
|
|
2662
|
+
volume: 1,
|
|
2644
2663
|
lowPass: {
|
|
2645
2664
|
smoothing: 0
|
|
2646
2665
|
},
|
|
@@ -2894,6 +2913,7 @@ var FilterManager = class {
|
|
|
2894
2913
|
async setVolume(volume) {
|
|
2895
2914
|
if (volume < 0 || volume > 5) throw new SyntaxError("Volume-Filter must be between 0 and 5");
|
|
2896
2915
|
this.data.volume = volume;
|
|
2916
|
+
this.filters.volume = volume !== 1;
|
|
2897
2917
|
await this.applyPlayerFilters();
|
|
2898
2918
|
return this.filters.volume;
|
|
2899
2919
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lavalink-client",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.2",
|
|
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",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"name": "Tomato6966",
|
|
49
49
|
"url": "https://github.com/tomato6966/"
|
|
50
50
|
},
|
|
51
|
-
"
|
|
51
|
+
"contributors": [],
|
|
52
52
|
"license": "MIT",
|
|
53
53
|
"bugs": {
|
|
54
54
|
"url": "https://github.com/tomato6966/lavalink-client/issues"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@typescript-eslint/parser": "^8.36.0",
|
|
64
64
|
"eslint": "^9.30.1",
|
|
65
65
|
"tsup": "^8.5.0",
|
|
66
|
-
"typescript": "^5.
|
|
66
|
+
"typescript": "^5.9.3"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"tslib": "^2.8.1",
|