magmastream 2.5.10 → 2.5.12
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 +13 -13
- package/dist/index.d.ts +2 -1
- package/dist/structures/Player.js +4 -18
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Magmastream
|
|
2
2
|
|
|
3
|
-
[](https://github.com/
|
|
4
|
-
[](https://github.com/
|
|
3
|
+
[](https://github.com/Magmastream-NPM/magmastream/blob/main/LICENSE)
|
|
4
|
+
[](https://github.com/Magmastream-NPM/magmastream/pulls)
|
|
5
5
|

|
|
6
|
-
[](https://github.com/
|
|
7
|
-
[](https://github.com/
|
|
8
|
-
[](https://github.com/sponsors/
|
|
6
|
+
[](https://github.com/Magmastream-NPM/magmastream/issues)
|
|
7
|
+
[](https://github.com/Magmastream-NPM/magmastream/pulls)
|
|
8
|
+
[](https://github.com/sponsors/Magmastream-NPM)
|
|
9
9
|
|
|
10
10
|
**Magmastream** a lavalink wrapper for NodeJs. Magmastream only supports lavalink version 4.
|
|
11
11
|
|
|
12
12
|
## Useful Links
|
|
13
13
|
|
|
14
|
-
- [Documentation](https://docs.
|
|
14
|
+
- [Documentation](https://docs.magmastream.com)
|
|
15
15
|
- [Example Bot](https://github.com/Blackfort-Hosting/Magmastream_Template_Bot)
|
|
16
16
|
|
|
17
17
|
## Contributing
|
|
@@ -37,13 +37,13 @@ Also you can join the [Discord Support Server](https://discord.com/invite/HV59Z3
|
|
|
37
37
|
|
|
38
38
|
## Used By
|
|
39
39
|
|
|
40
|
-
| Name
|
|
41
|
-
|
|
|
42
|
-
| [Lava Jukebox](https://discord.com/api/oauth2/authorize?client_id=887651843742793779&permissions=-1&redirect_uri=https%3A%2F%2Fdiscord.gg%2F4ZaXbbYSTZ&response_type=code&scope=guilds.join%20bot%20applications.commands)
|
|
43
|
-
| [Stal](https://discord.com/oauth2/authorize?client_id=923938180263182356&scope=bot%20applications.commands&permissions=27648861246)
|
|
44
|
-
| [Lunio](https://discord.com/api/oauth2/authorize?client_id=945030475779551415&permissions=61991952&scope=bot+applications.commands)
|
|
45
|
-
| [JukeDisc](https://discord.com/oauth2/authorize?client_id=1109751797549105176&permissions=968552214080&scope=bot+applications.commands)
|
|
46
|
-
| [Cool Music](https://discord.com/oauth2/authorize?client_id=923529398425096193&permissions=12888394808&redirect_uri=https%3A%2F%2Fdiscord.gg%2Fcool-music-support-925619107460698202&response_type=code&scope=bot%20identify%20applications.commands)
|
|
40
|
+
| Name | Creator |
|
|
41
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
|
|
42
|
+
| [Lava Jukebox](https://discord.com/api/oauth2/authorize?client_id=887651843742793779&permissions=-1&redirect_uri=https%3A%2F%2Fdiscord.gg%2F4ZaXbbYSTZ&response_type=code&scope=guilds.join%20bot%20applications.commands) | Abel Purnwasy |
|
|
43
|
+
| [Stal](https://discord.com/oauth2/authorize?client_id=923938180263182356&scope=bot%20applications.commands&permissions=27648861246) | memte |
|
|
44
|
+
| [Lunio](https://discord.com/api/oauth2/authorize?client_id=945030475779551415&permissions=61991952&scope=bot+applications.commands) | vexi |
|
|
45
|
+
| [JukeDisc](https://discord.com/oauth2/authorize?client_id=1109751797549105176&permissions=968552214080&scope=bot+applications.commands) | Theo |
|
|
46
|
+
| [Cool Music](https://discord.com/oauth2/authorize?client_id=923529398425096193&permissions=12888394808&redirect_uri=https%3A%2F%2Fdiscord.gg%2Fcool-music-support-925619107460698202&response_type=code&scope=bot%20identify%20applications.commands) | Itz Random |
|
|
47
47
|
|
|
48
48
|
If you want to add your own bot create a pull request with your bot added. Please add your full name.
|
|
49
49
|
|
package/dist/index.d.ts
CHANGED
|
@@ -268,8 +268,9 @@ declare class Player {
|
|
|
268
268
|
/**
|
|
269
269
|
* Gets recommended tracks and returns an array of tracks.
|
|
270
270
|
* @param track
|
|
271
|
+
* @param requester
|
|
271
272
|
*/
|
|
272
|
-
getRecommended(track: Track): Promise<
|
|
273
|
+
getRecommended(track: Track, requester?: User | ClientUser): Promise<Track[]>;
|
|
273
274
|
/**
|
|
274
275
|
* Sets the player volume.
|
|
275
276
|
* @param volume
|
|
@@ -234,8 +234,9 @@ class Player {
|
|
|
234
234
|
/**
|
|
235
235
|
* Gets recommended tracks and returns an array of tracks.
|
|
236
236
|
* @param track
|
|
237
|
+
* @param requester
|
|
237
238
|
*/
|
|
238
|
-
async getRecommended(track) {
|
|
239
|
+
async getRecommended(track, requester) {
|
|
239
240
|
const node = this.manager.useableNodes;
|
|
240
241
|
if (!node) {
|
|
241
242
|
throw new Error("No available nodes.");
|
|
@@ -266,23 +267,8 @@ class Player {
|
|
|
266
267
|
const playlistData = recommendedResult.data;
|
|
267
268
|
const recommendedTracks = playlistData.tracks;
|
|
268
269
|
if (recommendedTracks) {
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
const track = {
|
|
272
|
-
track: song.encoded,
|
|
273
|
-
title: song.info.title,
|
|
274
|
-
identifier: song.info.title,
|
|
275
|
-
author: song.info.author,
|
|
276
|
-
duration: song.info.length,
|
|
277
|
-
uri: song.info.uri,
|
|
278
|
-
artworkUrl: song.info.artworkUrl,
|
|
279
|
-
sourceName: song.info.sourceName,
|
|
280
|
-
requester: undefined,
|
|
281
|
-
plugininfo: song.pluginInfo,
|
|
282
|
-
};
|
|
283
|
-
spotifyArray.push(track);
|
|
284
|
-
});
|
|
285
|
-
return spotifyArray;
|
|
270
|
+
const tracks = recommendedTracks.map((track) => Utils_1.TrackUtils.build(track, requester));
|
|
271
|
+
return tracks;
|
|
286
272
|
}
|
|
287
273
|
}
|
|
288
274
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magmastream",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.12",
|
|
4
4
|
"description": "A user-friendly Lavalink client designed for NodeJS.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@favware/rollup-type-bundler": "^3.3.0",
|
|
18
18
|
"@types/lodash": "^4.17.7",
|
|
19
|
-
"@types/node": "^20.
|
|
19
|
+
"@types/node": "^20.16.1",
|
|
20
20
|
"@types/ws": "^8.5.12",
|
|
21
21
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
22
22
|
"@typescript-eslint/parser": "^7.18.0",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@discordjs/collection": "^2.1.0",
|
|
31
|
-
"axios": "^1.7.
|
|
31
|
+
"axios": "^1.7.5",
|
|
32
32
|
"events": "^3.3.0",
|
|
33
33
|
"lodash": "^4.17.21",
|
|
34
|
-
"tslib": "^2.
|
|
34
|
+
"tslib": "^2.7.0",
|
|
35
35
|
"ws": "^8.18.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"discord.js": "
|
|
38
|
+
"discord.js": "^14.15.3"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=16.0.0"
|
|
@@ -87,4 +87,4 @@
|
|
|
87
87
|
"homepage": "https://docs.blackforthosting.com",
|
|
88
88
|
"author": "Abel Purnwasy",
|
|
89
89
|
"license": "Apache-2.0"
|
|
90
|
-
}
|
|
90
|
+
}
|