magmastream 2.7.3 → 2.7.4

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/LICENSE CHANGED
@@ -1,176 +1,176 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
package/README.md CHANGED
@@ -1,68 +1,68 @@
1
- <p align="center">
2
- <img src="https://capsule-render.vercel.app/api?type=waving&color=gradient&height=200&section=header&text=Magmastream&fontSize=80&fontAlignY=35&animation=twinkling&fontColor=gradient" />
3
- </p>
4
-
5
- <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
6
- [![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)
7
- <!-- ALL-CONTRIBUTORS-BADGE:END -->
8
-
9
-
10
- **Magmastream** a lavalink wrapper for NodeJs. Magmastream only supports lavalink version 4.
11
-
12
- ## Useful Links
13
-
14
- - [Documentation](https://docs.magmastream.com)
15
- - [Example Bot](https://github.com/Blackfort-Hosting/Magmastream_Template_Bot)
16
-
17
- ## Contributing
18
-
19
- We appreciate contributions to enhance Magmastream. If you find any bugs or have suggestions for improvements, please feel free to contribute by following these steps:
20
-
21
- 1. Fork the repository.
22
- 2. Create a new branch for your changes.
23
- 3. Make the necessary modifications and fixes.
24
- 4. Test your changes thoroughly.
25
- 5. Submit a pull request, describing the changes you have made.
26
-
27
- Your contributions will help make the Magmastream even better!
28
-
29
- ## Bug Fixes
30
-
31
- If you have identified any bugs and have fixed them, we encourage you to [contribute](#contributing) by creating a pull request. We appreciate your effort in improving the stability and reliability of Magmastream.
32
-
33
- ## Support
34
-
35
- If you need any assistance or have questions, please open create an issue with your question.
36
- Also you can join the [Discord Support Server](https://discord.com/invite/HV59Z3zEjt).
37
-
38
- ## Used By
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 |
47
- | [Soundy](https://dsc.gg/sndy) | iaMJ |
48
- | [HamBot](https://discord.com/oauth2/authorize?client_id=1049314312776335390) | yanishamburger|
49
-
50
- If you want to add your own bot create a pull request with your bot added. Please add your full name.
51
-
52
- ## Contributors
53
-
54
- Special thanks to the all the contributors who have helped make Magmastream even better!
55
-
56
- <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
57
- <!-- prettier-ignore-start -->
58
- <!-- markdownlint-disable -->
59
- <!-- markdownlint-restore -->
60
- <!-- prettier-ignore-end -->
61
-
62
- <!-- ALL-CONTRIBUTORS-LIST:END -->
63
-
64
- ## Credits
65
-
66
- - [Erela.Js](https://github.com/MenuDocs/erela.js)
67
-
68
- ![Stats](https://repobeats.axiom.co/api/embed/e46896cea6c7ad6648effe4d7868ffa3fef0151b.svg "Repobeats analytics image")
1
+ <p align="center">
2
+ <img src="https://capsule-render.vercel.app/api?type=waving&color=gradient&height=200&section=header&text=Magmastream&fontSize=80&fontAlignY=35&animation=twinkling&fontColor=gradient" />
3
+ </p>
4
+
5
+ <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
6
+ [![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)
7
+ <!-- ALL-CONTRIBUTORS-BADGE:END -->
8
+
9
+
10
+ **Magmastream** a lavalink wrapper for NodeJs. Magmastream only supports lavalink version 4.
11
+
12
+ ## Useful Links
13
+
14
+ - [Documentation](https://docs.magmastream.com)
15
+ - [Example Bot](https://github.com/Blackfort-Hosting/Magmastream_Template_Bot)
16
+
17
+ ## Contributing
18
+
19
+ We appreciate contributions to enhance Magmastream. If you find any bugs or have suggestions for improvements, please feel free to contribute by following these steps:
20
+
21
+ 1. Fork the repository.
22
+ 2. Create a new branch for your changes.
23
+ 3. Make the necessary modifications and fixes.
24
+ 4. Test your changes thoroughly.
25
+ 5. Submit a pull request, describing the changes you have made.
26
+
27
+ Your contributions will help make the Magmastream even better!
28
+
29
+ ## Bug Fixes
30
+
31
+ If you have identified any bugs and have fixed them, we encourage you to [contribute](#contributing) by creating a pull request. We appreciate your effort in improving the stability and reliability of Magmastream.
32
+
33
+ ## Support
34
+
35
+ If you need any assistance or have questions, please open create an issue with your question.
36
+ Also you can join the [Discord Support Server](https://discord.com/invite/HV59Z3zEjt).
37
+
38
+ ## Used By
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 |
47
+ | [Soundy](https://dsc.gg/sndy) | iaMJ |
48
+ | [HamBot](https://discord.com/oauth2/authorize?client_id=1049314312776335390) | yanishamburger|
49
+
50
+ If you want to add your own bot create a pull request with your bot added. Please add your full name.
51
+
52
+ ## Contributors
53
+
54
+ Special thanks to the all the contributors who have helped make Magmastream even better!
55
+
56
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
57
+ <!-- prettier-ignore-start -->
58
+ <!-- markdownlint-disable -->
59
+ <!-- markdownlint-restore -->
60
+ <!-- prettier-ignore-end -->
61
+
62
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
63
+
64
+ ## Credits
65
+
66
+ - [Erela.Js](https://github.com/MenuDocs/erela.js)
67
+
68
+ ![Stats](https://repobeats.axiom.co/api/embed/e46896cea6c7ad6648effe4d7868ffa3fef0151b.svg "Repobeats analytics image")
package/dist/index.d.ts CHANGED
@@ -1316,9 +1316,13 @@ interface TrackDataInfo {
1316
1316
  sourceName?: TrackSourceName;
1317
1317
  }
1318
1318
  declare enum TrackSourceTypes {
1319
- Spotify = "spotify",
1319
+ AppleMusic = "applemusic",
1320
+ Bandcamp = "bandcamp",
1320
1321
  Deezer = "deezer",
1322
+ Jiosaavn = "jiosaavn",
1321
1323
  SoundCloud = "soundcloud",
1324
+ Spotify = "spotify",
1325
+ Tidal = "tidal",
1322
1326
  YouTube = "youtube"
1323
1327
  }
1324
1328
  type TrackSourceName = keyof typeof TrackSourceTypes;
@@ -1519,31 +1523,14 @@ declare class Manager extends EventEmitter {
1519
1523
  * @returns {Node} The node to use.
1520
1524
  */
1521
1525
  get useableNodes(): Node;
1522
- private lastSaveTimes;
1523
- private eventBatchInterval;
1524
- private eventBatchDuration;
1525
- private latestPlayerStates;
1526
- /**
1527
- * Registers the events that trigger saving player states.
1528
- * @private
1529
- */
1530
- private registerPlayerStateEvents;
1531
- /**
1532
- * Collects player state events and stores them in memory.
1533
- * This function is called whenever a player state event is emitted.
1534
- * It stores the latest player state for each guild in the {@link latestPlayerStates} map.
1535
- * If the event is "playerDestroy", it removes the player from the map and deletes the last save time for the guild.
1536
- * @param event The event that triggered this function.
1537
- * @param player The player that emitted the event.
1538
- */
1539
- private collectPlayerStateEvent;
1540
1526
  /**
1541
- * Processes the collected player state events
1542
- * This function is called when the batch timer expires and it clears the timer
1543
- * It saves the latest player states for each guild in the `latestPlayerStates` map
1544
- * It then clears the map after processing
1527
+ * Handles the shutdown of the process by saving all active players' states and optionally cleaning up inactive players.
1528
+ * This function is called when the process is about to exit.
1529
+ * It iterates through all players and calls {@link savePlayerState} to save their states.
1530
+ * Optionally, it also calls {@link cleanupInactivePlayers} to remove any stale player state files.
1531
+ * After saving and cleaning up, it exits the process.
1545
1532
  */
1546
- private processBatchEvents;
1533
+ private handleShutdown;
1547
1534
  /**
1548
1535
  * Initiates the Manager class.
1549
1536
  * @param options
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ManagerEventTypes = exports.PlayerStateEventTypes = exports.SearchPlatform = exports.UseNodeOptions = exports.Manager = void 0;
4
4
  const tslib_1 = require("tslib");
5
- /* eslint-disable no-async-promise-executor */
6
5
  const Utils_1 = require("./Utils");
7
6
  const collection_1 = require("@discordjs/collection");
8
7
  const events_1 = require("events");
@@ -91,12 +90,7 @@ class Manager extends events_1.EventEmitter {
91
90
  this.emit("debug", `[MANAGER] Recreating player: ${state.guild} from saved file: ${JSON.stringify(state.options)}`);
92
91
  const player = this.create(playerOptions);
93
92
  if (!lavaPlayer.state.connected) {
94
- try {
95
- player.connect();
96
- }
97
- catch (error) {
98
- continue;
99
- }
93
+ player.connect();
100
94
  }
101
95
  const tracks = [];
102
96
  if (!lavaPlayer.track) {
@@ -328,71 +322,38 @@ class Manager extends events_1.EventEmitter {
328
322
  ? this.leastLoadNode.first()
329
323
  : this.leastPlayersNode.first();
330
324
  }
331
- lastSaveTimes = new Map();
332
- eventBatchInterval = null;
333
- eventBatchDuration = 1000;
334
- latestPlayerStates = new Map();
335
- /**
336
- * Registers the events that trigger saving player states.
337
- * @private
338
- */
339
- registerPlayerStateEvents() {
340
- // The events to listen for
341
- const events = [
342
- // The player state has been updated
343
- ManagerEventTypes.PlayerStateUpdate,
344
- // The player has been destroyed
345
- ManagerEventTypes.PlayerDestroy,
346
- ];
347
- // Register the events
348
- for (const event of events) {
349
- // Call the collectPlayerStateEvent function when the event is emitted
350
- this.on(event, (player) => this.collectPlayerStateEvent(event, player));
351
- }
352
- }
353
- /**
354
- * Collects player state events and stores them in memory.
355
- * This function is called whenever a player state event is emitted.
356
- * It stores the latest player state for each guild in the {@link latestPlayerStates} map.
357
- * If the event is "playerDestroy", it removes the player from the map and deletes the last save time for the guild.
358
- * @param event The event that triggered this function.
359
- * @param player The player that emitted the event.
360
- */
361
- collectPlayerStateEvent(event, player) {
362
- if (event === "playerDestroy") {
363
- // Remove the player from the map and delete the last save time for the guild
364
- this.lastSaveTimes.delete(player.guild);
365
- this.players.delete(player.guild);
366
- this.cleanupInactivePlayers();
367
- }
368
- else if (event === "playerStateUpdate") {
369
- // Store the latest player state for the guild
370
- this.latestPlayerStates.set(player.guild, player);
371
- }
372
- // Start the batch timer if it's not already running
373
- if (!this.eventBatchInterval) {
374
- // Set the timer to process the batch events after the specified duration
375
- this.eventBatchInterval = setTimeout(() => this.processBatchEvents(), this.eventBatchDuration);
376
- }
377
- }
378
325
  /**
379
- * Processes the collected player state events
380
- * This function is called when the batch timer expires and it clears the timer
381
- * It saves the latest player states for each guild in the `latestPlayerStates` map
382
- * It then clears the map after processing
326
+ * Handles the shutdown of the process by saving all active players' states and optionally cleaning up inactive players.
327
+ * This function is called when the process is about to exit.
328
+ * It iterates through all players and calls {@link savePlayerState} to save their states.
329
+ * Optionally, it also calls {@link cleanupInactivePlayers} to remove any stale player state files.
330
+ * After saving and cleaning up, it exits the process.
383
331
  */
384
- processBatchEvents() {
385
- if (this.eventBatchInterval) {
386
- // Clear the timer so it doesn't interfere with the next batch
387
- clearTimeout(this.eventBatchInterval);
388
- this.eventBatchInterval = null;
389
- }
390
- // Save the latest player states for each guild in a single write operation
391
- this.latestPlayerStates.forEach((player, guildId) => {
392
- this.savePlayerState(guildId);
332
+ async handleShutdown() {
333
+ console.warn("\x1b[31m%s\x1b[0m", "MAGMASTREAM WARNING: Shutting down! Please wait, saving active players...");
334
+ // Create an array of promises for saving player states
335
+ const savePromises = Array.from(this.players.keys()).map((guildId) => {
336
+ return new Promise((resolve) => {
337
+ try {
338
+ this.savePlayerState(guildId);
339
+ resolve(); // Resolve immediately after calling savePlayerState
340
+ }
341
+ catch (error) {
342
+ console.error(`Error saving player state for guild ${guildId}:`, error);
343
+ throw error;
344
+ }
345
+ });
393
346
  });
394
- // Clear the latest player states after processing
395
- this.latestPlayerStates.clear();
347
+ // Wait for all save operations to complete and check for errors
348
+ const results = await Promise.allSettled(savePromises);
349
+ const errors = results.filter((result) => result.status === "rejected");
350
+ if (errors.length > 0) {
351
+ console.error("`\x1b[31m%s\x1b[0m", `MAGMASTREAM ERROR: ${errors.length} player states failed to save.`);
352
+ }
353
+ // Clean up inactive players here
354
+ this.cleanupInactivePlayers();
355
+ console.warn("\x1b[32m%s\x1b[0m", "MAGMASTREAM INFO: Shutting down complete, exiting...");
356
+ setTimeout(() => process.exit(errors.length > 0 ? 1 : 0), 100);
396
357
  }
397
358
  /**
398
359
  * Initiates the Manager class.
@@ -411,7 +372,8 @@ class Manager extends events_1.EventEmitter {
411
372
  */
412
373
  constructor(options) {
413
374
  super();
414
- this.registerPlayerStateEvents();
375
+ process.on("SIGINT", async () => await this.handleShutdown());
376
+ process.on("SIGTERM", async () => await this.handleShutdown());
415
377
  (0, managerCheck_1.default)(options);
416
378
  Utils_1.Structure.get("Player").init(this);
417
379
  Utils_1.Structure.get("Node").init(this);
@@ -640,7 +640,8 @@ class Node {
640
640
  response = await axios_1.default.get(url);
641
641
  }
642
642
  catch (error) {
643
- return false;
643
+ if (error)
644
+ return false;
644
645
  }
645
646
  if (response.data.error || !response.data.similartracks?.track?.length) {
646
647
  const retryUrl = `https://ws.audioscrobbler.com/2.0/?method=artist.getTopTracks&artist=${artist}&autocorrect=1&api_key=${apiKey}&format=json`;
@@ -295,8 +295,12 @@ var SeverityTypes;
295
295
  })(SeverityTypes || (exports.SeverityTypes = SeverityTypes = {}));
296
296
  var TrackSourceTypes;
297
297
  (function (TrackSourceTypes) {
298
- TrackSourceTypes["Spotify"] = "spotify";
298
+ TrackSourceTypes["AppleMusic"] = "applemusic";
299
+ TrackSourceTypes["Bandcamp"] = "bandcamp";
299
300
  TrackSourceTypes["Deezer"] = "deezer";
301
+ TrackSourceTypes["Jiosaavn"] = "jiosaavn";
300
302
  TrackSourceTypes["SoundCloud"] = "soundcloud";
303
+ TrackSourceTypes["Spotify"] = "spotify";
304
+ TrackSourceTypes["Tidal"] = "tidal";
301
305
  TrackSourceTypes["YouTube"] = "youtube";
302
306
  })(TrackSourceTypes || (exports.TrackSourceTypes = TrackSourceTypes = {}));
package/package.json CHANGED
@@ -1,90 +1,90 @@
1
- {
2
- "name": "magmastream",
3
- "version": "2.7.3",
4
- "description": "A user-friendly Lavalink client designed for NodeJS.",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "files": [
8
- "dist"
9
- ],
10
- "scripts": {
11
- "build": "tsc",
12
- "types": "rtb --dist dist",
13
- "lint": "eslint --ext .ts ./src",
14
- "ci": "run-s lint build types"
15
- },
16
- "devDependencies": {
17
- "@favware/rollup-type-bundler": "^3.3.0",
18
- "@types/lodash": "^4.17.14",
19
- "@types/node": "^20.17.12",
20
- "@types/ws": "^8.5.13",
21
- "@typescript-eslint/eslint-plugin": "^7.18.0",
22
- "@typescript-eslint/parser": "^7.18.0",
23
- "eslint": "^8.57.1",
24
- "npm-run-all": "^4.1.5",
25
- "typedoc": "^0.27.6",
26
- "typedoc-plugin-no-inherit": "^1.5.0",
27
- "typescript": "^5.7.3"
28
- },
29
- "dependencies": {
30
- "@discordjs/collection": "^2.1.1",
31
- "axios": "^1.7.9",
32
- "events": "^3.3.0",
33
- "lodash": "^4.17.21",
34
- "tslib": "^2.8.1",
35
- "ws": "^8.18.0"
36
- },
37
- "peerDependencies": {
38
- "discord.js": ">=13.0.0 <15.0.0"
39
- },
40
- "engines": {
41
- "node": ">=16.0.0"
42
- },
43
- "eslintConfig": {
44
- "root": true,
45
- "parser": "@typescript-eslint/parser",
46
- "plugins": [
47
- "@typescript-eslint"
48
- ],
49
- "rules": {
50
- "object-curly-spacing": [
51
- "error",
52
- "always"
53
- ]
54
- },
55
- "extends": [
56
- "eslint:recommended",
57
- "plugin:@typescript-eslint/recommended"
58
- ]
59
- },
60
- "keywords": [
61
- "lavalink client",
62
- "wrapper",
63
- "typescript",
64
- "discord.js",
65
- "node.js",
66
- "java",
67
- "javascript",
68
- "audio streaming",
69
- "music bot",
70
- "voice chat",
71
- "discord integration",
72
- "high performance",
73
- "scalable",
74
- "easy-to-use",
75
- "feature-rich",
76
- "cross-platform",
77
- "seamless integration",
78
- "community support",
79
- "documentation",
80
- "open-source",
81
- "lavalink",
82
- "magmastream"
83
- ],
84
- "repository": {
85
- "url": "https://github.com/Blackfort-Hosting/magmastream/tree/main"
86
- },
87
- "homepage": "https://docs.magmastream.com",
88
- "author": "Abel Purnwasy",
89
- "license": "Apache-2.0"
1
+ {
2
+ "name": "magmastream",
3
+ "version": "2.7.4",
4
+ "description": "A user-friendly Lavalink client designed for NodeJS.",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "types": "rtb --dist dist",
13
+ "lint": "eslint src",
14
+ "ci": "run-s lint build types"
15
+ },
16
+ "devDependencies": {
17
+ "@favware/rollup-type-bundler": "^4.0.0",
18
+ "@types/lodash": "^4.17.14",
19
+ "@types/node": "^22.10.7",
20
+ "@types/ws": "^8.5.13",
21
+ "@typescript-eslint/eslint-plugin": "^8.21.0",
22
+ "@typescript-eslint/parser": "^8.21.0",
23
+ "eslint": "^9.18.0",
24
+ "npm-run-all": "^4.1.5",
25
+ "typedoc": "^0.27.6",
26
+ "typedoc-plugin-no-inherit": "^1.5.0",
27
+ "typescript": "^5.7.3"
28
+ },
29
+ "dependencies": {
30
+ "@discordjs/collection": "^2.1.1",
31
+ "axios": "^1.7.9",
32
+ "events": "^3.3.0",
33
+ "lodash": "^4.17.21",
34
+ "tslib": "^2.8.1",
35
+ "ws": "^8.18.0"
36
+ },
37
+ "peerDependencies": {
38
+ "discord.js": ">=13.0.0 <15.0.0"
39
+ },
40
+ "engines": {
41
+ "node": ">=16.0.0"
42
+ },
43
+ "eslintConfig": {
44
+ "root": true,
45
+ "parser": "@typescript-eslint/parser",
46
+ "plugins": [
47
+ "@typescript-eslint"
48
+ ],
49
+ "rules": {
50
+ "object-curly-spacing": [
51
+ "error",
52
+ "always"
53
+ ]
54
+ },
55
+ "extends": [
56
+ "eslint:recommended",
57
+ "plugin:@typescript-eslint/recommended"
58
+ ]
59
+ },
60
+ "keywords": [
61
+ "lavalink client",
62
+ "wrapper",
63
+ "typescript",
64
+ "discord.js",
65
+ "node.js",
66
+ "java",
67
+ "javascript",
68
+ "audio streaming",
69
+ "music bot",
70
+ "voice chat",
71
+ "discord integration",
72
+ "high performance",
73
+ "scalable",
74
+ "easy-to-use",
75
+ "feature-rich",
76
+ "cross-platform",
77
+ "seamless integration",
78
+ "community support",
79
+ "documentation",
80
+ "open-source",
81
+ "lavalink",
82
+ "magmastream"
83
+ ],
84
+ "repository": {
85
+ "url": "https://github.com/Blackfort-Hosting/magmastream/tree/main"
86
+ },
87
+ "homepage": "https://docs.magmastream.com",
88
+ "author": "Abel Purnwasy",
89
+ "license": "Apache-2.0"
90
90
  }