lavalink-client 2.5.0 → 2.5.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/dist/cjs/structures/Filters.js +3 -2
- package/dist/cjs/structures/LavalinkManager.d.ts +1 -1
- package/dist/cjs/structures/LavalinkManager.js +15 -15
- package/dist/cjs/structures/LavalinkManagerStatics.js +15 -1
- package/dist/cjs/structures/Node.d.ts +1 -1
- package/dist/cjs/structures/Node.js +20 -10
- package/dist/cjs/structures/Player.js +56 -13
- package/dist/cjs/structures/Types/Manager.d.ts +2 -0
- package/dist/cjs/structures/Types/Track.d.ts +1 -1
- package/dist/cjs/structures/Types/Utils.d.ts +5 -5
- package/dist/cjs/structures/Utils.d.ts +2 -1
- package/dist/cjs/structures/Utils.js +46 -4
- package/dist/esm/structures/Filters.js +3 -2
- package/dist/esm/structures/LavalinkManager.d.ts +1 -1
- package/dist/esm/structures/LavalinkManager.js +16 -16
- package/dist/esm/structures/LavalinkManagerStatics.js +15 -1
- package/dist/esm/structures/Node.d.ts +1 -1
- package/dist/esm/structures/Node.js +21 -11
- package/dist/esm/structures/Player.js +57 -14
- package/dist/esm/structures/Types/Manager.d.ts +2 -0
- package/dist/esm/structures/Types/Track.d.ts +1 -1
- package/dist/esm/structures/Types/Utils.d.ts +5 -5
- package/dist/esm/structures/Utils.d.ts +2 -1
- package/dist/esm/structures/Utils.js +45 -4
- package/dist/types/structures/LavalinkManager.d.ts +1 -1
- package/dist/types/structures/Node.d.ts +1 -1
- package/dist/types/structures/Types/Manager.d.ts +2 -0
- package/dist/types/structures/Types/Track.d.ts +1 -1
- package/dist/types/structures/Types/Utils.d.ts +5 -5
- package/dist/types/structures/Utils.d.ts +2 -1
- package/package.json +11 -11
|
@@ -2,9 +2,9 @@ import { EventEmitter } from "events";
|
|
|
2
2
|
import { NodeManager } from "./NodeManager";
|
|
3
3
|
import { Player } from "./Player";
|
|
4
4
|
import { ManagerUtils, MiniMap } from "./Utils";
|
|
5
|
+
import type { ChannelDeletePacket, VoicePacket, VoiceServer, VoiceState } from "./Types/Utils";
|
|
5
6
|
import type { BotClientOptions, LavalinkManagerEvents, ManagerOptions } from "./Types/Manager";
|
|
6
7
|
import type { PlayerOptions } from "./Types/Player";
|
|
7
|
-
import type { ChannelDeletePacket, VoicePacket, VoiceServer, VoiceState } from "./Types/Utils";
|
|
8
8
|
export declare class LavalinkManager extends EventEmitter {
|
|
9
9
|
/**
|
|
10
10
|
* Emit an event
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { Base64, InvalidLavalinkRestRequest, LavalinkPlayer, LavaSearchQuery, LavaSearchResponse, PlayerUpdateInfo, RoutePlanner, SearchQuery, SearchResult, Session } from "./Types/Utils";
|
|
1
2
|
import type { Player } from "./Player";
|
|
2
3
|
import type { DestroyReasonsType, DisconnectReasonsType } from "./Types/Player";
|
|
3
4
|
import type { Track } from "./Types/Track";
|
|
4
|
-
import type { Base64, InvalidLavalinkRestRequest, LavalinkPlayer, LavaSearchQuery, LavaSearchResponse, PlayerUpdateInfo, RoutePlanner, SearchQuery, SearchResult, Session } from "./Types/Utils";
|
|
5
5
|
import type { NodeManager } from "./NodeManager";
|
|
6
6
|
import type { BaseNodeStats, LavalinkInfo, LavalinkNodeOptions, LyricsResult, ModifyRequest, NodeStats, SponsorBlockSegment } from "./Types/Node";
|
|
7
7
|
/**
|
|
@@ -172,6 +172,8 @@ export interface LavalinkManagerEvents {
|
|
|
172
172
|
* @event Manager#LyricsNotFound
|
|
173
173
|
*/
|
|
174
174
|
"LyricsNotFound": (player: Player, track: Track | UnresolvedTrack | null, payload: LyricsNotFoundEvent) => void;
|
|
175
|
+
"playerResumed": (player: Player, track: Track | UnresolvedTrack | null) => void;
|
|
176
|
+
"playerPaused": (player: Player, track: Track | UnresolvedTrack | null) => void;
|
|
175
177
|
}
|
|
176
178
|
/**
|
|
177
179
|
* The Bot client Options needed for the manager
|
|
@@ -4,7 +4,7 @@ import type { Base64 } from "./Utils";
|
|
|
4
4
|
/** Sourcenames provided by lavalink server */
|
|
5
5
|
export type LavalinkSourceNames = "youtube" | "youtubemusic" | "soundcloud" | "bandcamp" | "twitch";
|
|
6
6
|
/** Source Names provided by lava src plugin */
|
|
7
|
-
export type LavalinkPlugin_LavaSrc_SourceNames = "deezer" | "spotify" | "applemusic" | "yandexmusic" | "flowery-tts";
|
|
7
|
+
export type LavalinkPlugin_LavaSrc_SourceNames = "deezer" | "spotify" | "applemusic" | "yandexmusic" | "flowery-tts" | "vkmusic" | "tidal" | "qobuz";
|
|
8
8
|
/** Source Names provided by jiosaavan plugin */
|
|
9
9
|
export type LavalinkPlugin_JioSaavn_SourceNames = "jiosaavn";
|
|
10
10
|
/** The SourceNames provided by lavalink */
|
|
@@ -11,7 +11,7 @@ export type Opaque<T, K> = T & {
|
|
|
11
11
|
export type IntegerNumber = Opaque<number, 'Int'>;
|
|
12
12
|
/** Opqaue tyep for floatnumber */
|
|
13
13
|
export type FloatNumber = Opaque<number, 'Float'>;
|
|
14
|
-
export type LavaSrcSearchPlatformBase = "spsearch" | "sprec" | "amsearch" | "dzsearch" | "dzisrc" | "dzrec" | "ymsearch" | "ymrec" | "vksearch" | "vkrec";
|
|
14
|
+
export type LavaSrcSearchPlatformBase = "spsearch" | "sprec" | "amsearch" | "dzsearch" | "dzisrc" | "dzrec" | "ymsearch" | "ymrec" | "vksearch" | "vkrec" | "tdsearch" | "tdrec" | "qbsearch" | "qbisrc" | "qbrec";
|
|
15
15
|
export type LavaSrcSearchPlatform = LavaSrcSearchPlatformBase | "ftts";
|
|
16
16
|
export type JioSaavnSearchPlatform = "jssearch" | "jsrec";
|
|
17
17
|
export type DuncteSearchPlatform = "speak" | "phsearch" | "pornhub" | "porn" | "tts";
|
|
@@ -20,9 +20,9 @@ export type LavalinkClientSearchPlatformResolve = "bandcamp" | "bc";
|
|
|
20
20
|
export type LavalinkSearchPlatform = "ytsearch" | "ytmsearch" | "scsearch" | "bcsearch" | LavaSrcSearchPlatform | DuncteSearchPlatform | JioSaavnSearchPlatform | LavalinkClientSearchPlatform;
|
|
21
21
|
export type ClientCustomSearchPlatformUtils = "local" | "http" | "https" | "link" | "uri";
|
|
22
22
|
export type ClientSearchPlatform = ClientCustomSearchPlatformUtils | // for file/link requests
|
|
23
|
-
"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 music" | "vkmusic" | "flowerytts" | "flowery" | "flowery.tts" | LavalinkClientSearchPlatformResolve | LavalinkClientSearchPlatform | "js" | "jiosaavn";
|
|
23
|
+
"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";
|
|
24
24
|
export type SearchPlatform = LavalinkSearchPlatform | ClientSearchPlatform;
|
|
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" | "jiosaavn" | "appleMusic" | "TwitchTv" | "vimeo";
|
|
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" | "jiosaavn" | "appleMusic" | "tidal" | "TwitchTv" | "vimeo";
|
|
26
26
|
export interface PlaylistInfo {
|
|
27
27
|
/** The playlist name */
|
|
28
28
|
name: string;
|
|
@@ -92,13 +92,13 @@ export interface TrackEndEvent extends PlayerEvent {
|
|
|
92
92
|
export interface TrackExceptionEvent extends PlayerEvent {
|
|
93
93
|
type: "TrackExceptionEvent";
|
|
94
94
|
exception?: Exception;
|
|
95
|
-
|
|
95
|
+
track: LavalinkTrack;
|
|
96
96
|
error: string;
|
|
97
97
|
}
|
|
98
98
|
export interface TrackStuckEvent extends PlayerEvent {
|
|
99
99
|
type: "TrackStuckEvent";
|
|
100
100
|
thresholdMs: number;
|
|
101
|
-
|
|
101
|
+
track: LavalinkTrack;
|
|
102
102
|
}
|
|
103
103
|
export interface WebSocketClosedEvent extends PlayerEvent {
|
|
104
104
|
type: "WebSocketClosedEvent";
|
|
@@ -112,4 +112,5 @@ export declare class MiniMap<K, V> extends Map<K, V> {
|
|
|
112
112
|
map<T>(fn: (value: V, key: K, miniMap: this) => T): T[];
|
|
113
113
|
map<This, T>(fn: (this: This, value: V, key: K, miniMap: this) => T, thisArg: This): T[];
|
|
114
114
|
}
|
|
115
|
-
export declare function queueTrackEnd(player: Player): Promise<Track>;
|
|
115
|
+
export declare function queueTrackEnd(player: Player, dontShiftQueue?: boolean): Promise<Track>;
|
|
116
|
+
export declare function safeStringify(obj: any, padding?: number): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lavalink-client",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
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",
|
|
@@ -58,19 +58,19 @@
|
|
|
58
58
|
},
|
|
59
59
|
"homepage": "https://tomato6966.github.io/lavalink-client/",
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@eslint/eslintrc": "^3.
|
|
62
|
-
"@eslint/js": "^9.
|
|
63
|
-
"@types/node": "^22.
|
|
64
|
-
"@types/ws": "^8.
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
66
|
-
"@typescript-eslint/parser": "^8.
|
|
67
|
-
"eslint": "^9.
|
|
68
|
-
"tsc-alias": "^1.8.
|
|
69
|
-
"typescript": "^5.
|
|
61
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
62
|
+
"@eslint/js": "^9.27.0",
|
|
63
|
+
"@types/node": "^22.15.18",
|
|
64
|
+
"@types/ws": "^8.18.1",
|
|
65
|
+
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
66
|
+
"@typescript-eslint/parser": "^8.32.1",
|
|
67
|
+
"eslint": "^9.27.0",
|
|
68
|
+
"tsc-alias": "^1.8.16",
|
|
69
|
+
"typescript": "^5.8.3"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"tslib": "^2.8.1",
|
|
73
|
-
"ws": "^8.18.
|
|
73
|
+
"ws": "^8.18.2"
|
|
74
74
|
},
|
|
75
75
|
"engines": {
|
|
76
76
|
"node": ">=18.0.0",
|