magmastream 2.7.4 → 2.7.5
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 +16 -25
- package/dist/index.d.ts +2 -2
- package/dist/structures/Node.js +20 -6
- package/dist/structures/Queue.js +15 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -2,38 +2,32 @@
|
|
|
2
2
|
<img src="https://capsule-render.vercel.app/api?type=waving&color=gradient&height=200§ion=header&text=Magmastream&fontSize=80&fontAlignY=35&animation=twinkling&fontColor=gradient" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
[](#contributors-)
|
|
7
|
-
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
**Magmastream** a lavalink wrapper for NodeJs. Magmastream only supports lavalink version 4.
|
|
5
|
+
**Magmastream** is a powerful and feature-rich Lavalink wrapper for Node.js, designed to supercharge your audio applications. Currently optimized exclusively for Lavalink version 4, Magmastream delivers seamless audio streaming capabilities with elegant simplicity.
|
|
11
6
|
|
|
12
7
|
## Useful Links
|
|
13
8
|
|
|
14
9
|
- [Documentation](https://docs.magmastream.com)
|
|
15
|
-
- [Example Bot](https://github.com/
|
|
10
|
+
- [Example Bot](https://github.com/Magmastream-NPM/magmastream_basics_bot)
|
|
16
11
|
|
|
17
12
|
## Contributing
|
|
18
13
|
|
|
19
|
-
We
|
|
14
|
+
We warmly welcome contributions that help elevate Magmastream to new heights! Whether you've discovered bugs that need squashing or have brilliant ideas for improvements, we'd love to see your contributions. Here's how you can join our community of developers:
|
|
20
15
|
|
|
21
|
-
1. Fork the repository.
|
|
22
|
-
2. Create a
|
|
23
|
-
3.
|
|
24
|
-
4.
|
|
25
|
-
5. Submit a pull request, describing the
|
|
16
|
+
1. Fork the repository to your own GitHub account.
|
|
17
|
+
2. Create a fresh branch that reflects your intended changes.
|
|
18
|
+
3. Implement your awesome modifications and fixes.
|
|
19
|
+
4. Rigorously test your changes to ensure everything works flawlessly.
|
|
20
|
+
5. Submit a detailed pull request, clearly describing the enhancements you've made.
|
|
26
21
|
|
|
27
|
-
|
|
22
|
+
Together, we can make Magmastream an even more powerful and robust tool for everyone! Your expertise and creativity are invaluable to our project's growth. 🚀✨
|
|
28
23
|
|
|
29
24
|
## Bug Fixes
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
Have you discovered and squashed some pesky bugs? Fantastic! We'd love for you to [contribute](#contributing) by submitting a pull request. Your dedication to enhancing Magmastream's stability and reliability is invaluable to our community. Together, we can make this project even more robust! 🐛✨
|
|
32
27
|
|
|
33
28
|
## Support
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Also you can join the [Discord Support Server](https://discord.com/invite/HV59Z3zEjt).
|
|
29
|
+
Need help or have questions? Feel free to create an issue, and our community will be happy to assist you!
|
|
30
|
+
For real-time support and engaging discussions, join our vibrant [Discord Support Server](https://discord.com/invite/HV59Z3zEjt).
|
|
37
31
|
|
|
38
32
|
## Used By
|
|
39
33
|
|
|
@@ -44,25 +38,22 @@ Also you can join the [Discord Support Server](https://discord.com/invite/HV59Z3
|
|
|
44
38
|
| [Lunio](https://discord.com/api/oauth2/authorize?client_id=945030475779551415&permissions=61991952&scope=bot+applications.commands) | vexi |
|
|
45
39
|
| [JukeDisc](https://discord.com/oauth2/authorize?client_id=1109751797549105176&permissions=968552214080&scope=bot+applications.commands) | Theo |
|
|
46
40
|
| [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
|
-
| [Soundy](https://dsc.gg/sndy)
|
|
41
|
+
| [Soundy](https://dsc.gg/sndy) | iaMJ |
|
|
48
42
|
| [HamBot](https://discord.com/oauth2/authorize?client_id=1049314312776335390) | yanishamburger|
|
|
49
43
|
|
|
50
|
-
|
|
44
|
+
Want to showcase your bot? Feel free to create a pull request and add it to our growing list of amazing bots powered by Magmastream!
|
|
51
45
|
|
|
52
46
|
## Contributors
|
|
53
47
|
|
|
54
|
-
|
|
48
|
+
A heartfelt thank you to all our amazing contributors who have poured their time and expertise into making Magmastream truly exceptional! Your dedication and passion continue to drive this project forward. 🚀✨
|
|
55
49
|
|
|
56
50
|
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
57
51
|
<!-- prettier-ignore-start -->
|
|
58
52
|
<!-- markdownlint-disable -->
|
|
53
|
+
|
|
59
54
|
<!-- markdownlint-restore -->
|
|
60
55
|
<!-- prettier-ignore-end -->
|
|
61
56
|
|
|
62
57
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
63
58
|
|
|
64
|
-
## Credits
|
|
65
|
-
|
|
66
|
-
- [Erela.Js](https://github.com/MenuDocs/erela.js)
|
|
67
|
-
|
|
68
59
|

|
package/dist/index.d.ts
CHANGED
|
@@ -1729,11 +1729,11 @@ interface PauseChangeEvent {
|
|
|
1729
1729
|
currentPause: boolean | null;
|
|
1730
1730
|
}
|
|
1731
1731
|
interface QueueChangeEvent {
|
|
1732
|
-
changeType: "add" | "remove" | "clear" | "shuffle" | "roundRobin" | "userBlock";
|
|
1732
|
+
changeType: "add" | "remove" | "clear" | "shuffle" | "roundRobin" | "userBlock" | "autoPlayAdd";
|
|
1733
1733
|
tracks?: (Track | UnresolvedTrack)[];
|
|
1734
1734
|
}
|
|
1735
1735
|
interface TrackChangeEvent {
|
|
1736
|
-
changeType: "start" | "end" | "previous" | "timeUpdate";
|
|
1736
|
+
changeType: "start" | "end" | "previous" | "timeUpdate" | "autoPlay";
|
|
1737
1737
|
track: Track;
|
|
1738
1738
|
previousTime?: number | null;
|
|
1739
1739
|
currentTime?: number | null;
|
package/dist/structures/Node.js
CHANGED
|
@@ -448,6 +448,17 @@ class Node {
|
|
|
448
448
|
player.playing = true;
|
|
449
449
|
player.paused = false;
|
|
450
450
|
this.manager.emit(Manager_1.ManagerEventTypes.TrackStart, player, track, payload);
|
|
451
|
+
const botUser = player.get("Internal_BotUser");
|
|
452
|
+
if (botUser && botUser.id === track.requester.id) {
|
|
453
|
+
this.manager.emit(Manager_1.ManagerEventTypes.PlayerStateUpdate, oldPlayer, player, {
|
|
454
|
+
changeType: Manager_1.PlayerStateEventTypes.TrackChange,
|
|
455
|
+
details: {
|
|
456
|
+
changeType: "autoPlay",
|
|
457
|
+
track: track,
|
|
458
|
+
},
|
|
459
|
+
});
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
451
462
|
this.manager.emit(Manager_1.ManagerEventTypes.PlayerStateUpdate, oldPlayer, player, {
|
|
452
463
|
changeType: Manager_1.PlayerStateEventTypes.TrackChange,
|
|
453
464
|
details: {
|
|
@@ -592,12 +603,15 @@ class Node {
|
|
|
592
603
|
else {
|
|
593
604
|
// Check for other platforms in the specified order
|
|
594
605
|
const alternativePlatforms = [
|
|
595
|
-
Manager_1.SearchPlatform.
|
|
596
|
-
Manager_1.SearchPlatform.
|
|
597
|
-
Manager_1.SearchPlatform.
|
|
598
|
-
Manager_1.SearchPlatform.
|
|
599
|
-
Manager_1.SearchPlatform.
|
|
600
|
-
Manager_1.SearchPlatform.
|
|
606
|
+
Manager_1.SearchPlatform.Spotify, // 1
|
|
607
|
+
Manager_1.SearchPlatform.Deezer, // 2
|
|
608
|
+
Manager_1.SearchPlatform.SoundCloud, // 3
|
|
609
|
+
Manager_1.SearchPlatform.AppleMusic, // 4
|
|
610
|
+
Manager_1.SearchPlatform.Bandcamp, // 5
|
|
611
|
+
Manager_1.SearchPlatform.Jiosaavn, // 6
|
|
612
|
+
Manager_1.SearchPlatform.Tidal, // 7
|
|
613
|
+
Manager_1.SearchPlatform.YouTubeMusic, // 8
|
|
614
|
+
Manager_1.SearchPlatform.YouTube, // 9
|
|
601
615
|
];
|
|
602
616
|
for (const platform of alternativePlatforms) {
|
|
603
617
|
if (enabledSources.includes(platformMapping[platform])) {
|
package/dist/structures/Queue.js
CHANGED
|
@@ -110,6 +110,21 @@ class Queue extends Array {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
+
if (this.manager.players.get(this.guild).isAutoplay) {
|
|
114
|
+
if (!Array.isArray(track)) {
|
|
115
|
+
const botUser = this.manager.players.get(this.guild).get("Internal_BotUser");
|
|
116
|
+
if (botUser && botUser.id === track.requester.id) {
|
|
117
|
+
this.manager.emit(Manager_1.ManagerEventTypes.PlayerStateUpdate, oldPlayer, this.manager.players.get(this.guild), {
|
|
118
|
+
changeType: Manager_1.PlayerStateEventTypes.QueueChange,
|
|
119
|
+
details: {
|
|
120
|
+
changeType: "autoPlayAdd",
|
|
121
|
+
tracks: Array.isArray(track) ? track : [track],
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
113
128
|
// Emit a player state update event with the added track(s)
|
|
114
129
|
this.manager.emit(Manager_1.ManagerEventTypes.PlayerStateUpdate, oldPlayer, this.manager.players.get(this.guild), {
|
|
115
130
|
changeType: Manager_1.PlayerStateEventTypes.QueueChange,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magmastream",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.5",
|
|
4
4
|
"description": "A user-friendly Lavalink client designed for NodeJS.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"build": "tsc",
|
|
12
12
|
"types": "rtb --dist dist",
|
|
13
13
|
"lint": "eslint src",
|
|
14
|
-
"
|
|
14
|
+
"lint:fix": "eslint --fix src",
|
|
15
|
+
"ci": "run-s lint:fix lint build types"
|
|
15
16
|
},
|
|
16
17
|
"devDependencies": {
|
|
17
18
|
"@favware/rollup-type-bundler": "^4.0.0",
|