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 CHANGED
@@ -1,17 +1,17 @@
1
1
  # Magmastream
2
2
 
3
- [![License](https://img.shields.io/badge/license-Apache-blue.svg)](https://github.com/Blackfort-Hosting/magmastream/blob/main/LICENSE)
4
- [![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](https://github.com/Blackfort-Hosting/magmastream/pulls)
3
+ [![License](https://img.shields.io/badge/license-Apache-blue.svg)](https://github.com/Magmastream-NPM/magmastream/blob/main/LICENSE)
4
+ [![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](https://github.com/Magmastream-NPM/magmastream/pulls)
5
5
  ![GitHub Stars](https://img.shields.io/github/stars/Blackfort-Hosting/magmastream.svg)
6
- [![Issues](https://img.shields.io/github/issues/Blackfort-Hosting/magmastream.svg)](https://github.com/Blackfort-Hosting/magmastream/issues)
7
- [![Pull Requests](https://img.shields.io/github/issues-pr/Blackfort-Hosting/magmastream.svg)](https://github.com/Blackfort-Hosting/magmastream/pulls)
8
- [![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/Blackfort-Hosting)
6
+ [![Issues](https://img.shields.io/github/issues/Blackfort-Hosting/magmastream.svg)](https://github.com/Magmastream-NPM/magmastream/issues)
7
+ [![Pull Requests](https://img.shields.io/github/issues-pr/Blackfort-Hosting/magmastream.svg)](https://github.com/Magmastream-NPM/magmastream/pulls)
8
+ [![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](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.blackforthosting.com)
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 | 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 |
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<any[]>;
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 spotifyArray = [];
270
- recommendedTracks.forEach((song) => {
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.10",
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.14.14",
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.3",
31
+ "axios": "^1.7.5",
32
32
  "events": "^3.3.0",
33
33
  "lodash": "^4.17.21",
34
- "tslib": "^2.6.3",
34
+ "tslib": "^2.7.0",
35
35
  "ws": "^8.18.0"
36
36
  },
37
37
  "peerDependencies": {
38
- "discord.js": ">=13.0.0 <15.0.0"
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
+ }