lavalink-client 2.6.5 → 2.6.6
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 +1 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +6 -3
- package/dist/index.mjs +6 -3
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -116,6 +116,7 @@ This client powers various Discord bots:
|
|
|
116
116
|
- [Akyn](https://akynbot.vercel.app/) (@notdeltaxd)
|
|
117
117
|
- **Bots Community (Users):**
|
|
118
118
|
- [Soundy](https://github.com/idMJA/Soundy) (@idMJA)
|
|
119
|
+
- [BeatBot ](https://getbeatbot.vercel.app/) (@zenitsujs)
|
|
119
120
|
|
|
120
121
|
***
|
|
121
122
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1668,18 +1668,18 @@ declare class ManagerUtils {
|
|
|
1668
1668
|
* This check is not done automatically, you need to check it yourself by doing:
|
|
1669
1669
|
* @example
|
|
1670
1670
|
* ```ts
|
|
1671
|
-
* const
|
|
1671
|
+
* const res = await player.search("Adele");
|
|
1672
1672
|
*
|
|
1673
1673
|
* // short hand:
|
|
1674
|
-
* const validTracks = tracks.filter(client.lavalink.utils.isNotBrokenTrack)
|
|
1674
|
+
* const validTracks = res.tracks.filter(client.lavalink.utils.isNotBrokenTrack)
|
|
1675
1675
|
* // or with options:
|
|
1676
|
-
* const
|
|
1676
|
+
* const validTracks = res.tracks.filter(t => client.lavalink.utils.isNotBrokenTrack(t, 29e3));
|
|
1677
1677
|
*
|
|
1678
1678
|
* // then you can add it to the queue.
|
|
1679
1679
|
* await player.queue.add(validTracks);
|
|
1680
1680
|
* ```
|
|
1681
1681
|
*/
|
|
1682
|
-
isNotBrokenTrack(data: Track, minDuration?: number): data is Track;
|
|
1682
|
+
isNotBrokenTrack(data: Track | UnresolvedTrack, minDuration?: number): data is Track;
|
|
1683
1683
|
/**
|
|
1684
1684
|
* Validate if a data is equal to a track
|
|
1685
1685
|
* @param data the Track to validate
|
package/dist/index.d.ts
CHANGED
|
@@ -1668,18 +1668,18 @@ declare class ManagerUtils {
|
|
|
1668
1668
|
* This check is not done automatically, you need to check it yourself by doing:
|
|
1669
1669
|
* @example
|
|
1670
1670
|
* ```ts
|
|
1671
|
-
* const
|
|
1671
|
+
* const res = await player.search("Adele");
|
|
1672
1672
|
*
|
|
1673
1673
|
* // short hand:
|
|
1674
|
-
* const validTracks = tracks.filter(client.lavalink.utils.isNotBrokenTrack)
|
|
1674
|
+
* const validTracks = res.tracks.filter(client.lavalink.utils.isNotBrokenTrack)
|
|
1675
1675
|
* // or with options:
|
|
1676
|
-
* const
|
|
1676
|
+
* const validTracks = res.tracks.filter(t => client.lavalink.utils.isNotBrokenTrack(t, 29e3));
|
|
1677
1677
|
*
|
|
1678
1678
|
* // then you can add it to the queue.
|
|
1679
1679
|
* await player.queue.add(validTracks);
|
|
1680
1680
|
* ```
|
|
1681
1681
|
*/
|
|
1682
|
-
isNotBrokenTrack(data: Track, minDuration?: number): data is Track;
|
|
1682
|
+
isNotBrokenTrack(data: Track | UnresolvedTrack, minDuration?: number): data is Track;
|
|
1683
1683
|
/**
|
|
1684
1684
|
* Validate if a data is equal to a track
|
|
1685
1685
|
* @param data the Track to validate
|
package/dist/index.js
CHANGED
|
@@ -677,12 +677,12 @@ var ManagerUtils = class {
|
|
|
677
677
|
* This check is not done automatically, you need to check it yourself by doing:
|
|
678
678
|
* @example
|
|
679
679
|
* ```ts
|
|
680
|
-
* const
|
|
680
|
+
* const res = await player.search("Adele");
|
|
681
681
|
*
|
|
682
682
|
* // short hand:
|
|
683
|
-
* const validTracks = tracks.filter(client.lavalink.utils.isNotBrokenTrack)
|
|
683
|
+
* const validTracks = res.tracks.filter(client.lavalink.utils.isNotBrokenTrack)
|
|
684
684
|
* // or with options:
|
|
685
|
-
* const
|
|
685
|
+
* const validTracks = res.tracks.filter(t => client.lavalink.utils.isNotBrokenTrack(t, 29e3));
|
|
686
686
|
*
|
|
687
687
|
* // then you can add it to the queue.
|
|
688
688
|
* await player.queue.add(validTracks);
|
|
@@ -3764,6 +3764,9 @@ var Queue = class {
|
|
|
3764
3764
|
* ```
|
|
3765
3765
|
*/
|
|
3766
3766
|
async remove(removeQueryTrack) {
|
|
3767
|
+
if (removeQueryTrack === null || removeQueryTrack === void 0 || Array.isArray(removeQueryTrack) && removeQueryTrack.length === 0) {
|
|
3768
|
+
return null;
|
|
3769
|
+
}
|
|
3767
3770
|
const oldStored = typeof this.queueChanges?.tracksRemoved === "function" ? this.utils.toJSON() : null;
|
|
3768
3771
|
if (typeof removeQueryTrack === "number") {
|
|
3769
3772
|
const toRemove2 = this.tracks[removeQueryTrack];
|
package/dist/index.mjs
CHANGED
|
@@ -617,12 +617,12 @@ var ManagerUtils = class {
|
|
|
617
617
|
* This check is not done automatically, you need to check it yourself by doing:
|
|
618
618
|
* @example
|
|
619
619
|
* ```ts
|
|
620
|
-
* const
|
|
620
|
+
* const res = await player.search("Adele");
|
|
621
621
|
*
|
|
622
622
|
* // short hand:
|
|
623
|
-
* const validTracks = tracks.filter(client.lavalink.utils.isNotBrokenTrack)
|
|
623
|
+
* const validTracks = res.tracks.filter(client.lavalink.utils.isNotBrokenTrack)
|
|
624
624
|
* // or with options:
|
|
625
|
-
* const
|
|
625
|
+
* const validTracks = res.tracks.filter(t => client.lavalink.utils.isNotBrokenTrack(t, 29e3));
|
|
626
626
|
*
|
|
627
627
|
* // then you can add it to the queue.
|
|
628
628
|
* await player.queue.add(validTracks);
|
|
@@ -3704,6 +3704,9 @@ var Queue = class {
|
|
|
3704
3704
|
* ```
|
|
3705
3705
|
*/
|
|
3706
3706
|
async remove(removeQueryTrack) {
|
|
3707
|
+
if (removeQueryTrack === null || removeQueryTrack === void 0 || Array.isArray(removeQueryTrack) && removeQueryTrack.length === 0) {
|
|
3708
|
+
return null;
|
|
3709
|
+
}
|
|
3707
3710
|
const oldStored = typeof this.queueChanges?.tracksRemoved === "function" ? this.utils.toJSON() : null;
|
|
3708
3711
|
if (typeof removeQueryTrack === "number") {
|
|
3709
3712
|
const toRemove2 = this.tracks[removeQueryTrack];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lavalink-client",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.6",
|
|
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",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"homepage": "https://tomato6966.github.io/lavalink-client/",
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@eslint/eslintrc": "^3.3.1",
|
|
59
|
-
"@eslint/js": "^9.
|
|
60
|
-
"@types/node": "^24.0
|
|
59
|
+
"@eslint/js": "^9.39.1",
|
|
60
|
+
"@types/node": "^24.10.0",
|
|
61
61
|
"@types/ws": "^8.18.1",
|
|
62
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
63
|
-
"@typescript-eslint/parser": "^8.
|
|
64
|
-
"eslint": "^9.
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^8.46.3",
|
|
63
|
+
"@typescript-eslint/parser": "^8.46.3",
|
|
64
|
+
"eslint": "^9.39.1",
|
|
65
65
|
"tsup": "^8.5.0",
|
|
66
66
|
"typescript": "^5.9.3"
|
|
67
67
|
},
|