magmastream 2.0.8 → 2.1.0
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 +4 -2
- package/dist/index.d.ts +14 -8
- package/dist/structures/Player.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,9 +35,11 @@ Also you can join the [Discord Support Server](https://discord.com/invite/HV59Z3
|
|
|
35
35
|
|
|
36
36
|
## Used By
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
| Name | Creator |
|
|
39
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
|
|
40
|
+
| [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 |
|
|
39
41
|
|
|
40
|
-
If you want to add your own bot create a pull request with your bot added.
|
|
42
|
+
If you want to add your own bot create a pull request with your bot added. Please add your full name.
|
|
41
43
|
|
|
42
44
|
## Contributors
|
|
43
45
|
|
package/dist/index.d.ts
CHANGED
|
@@ -754,10 +754,11 @@ interface Manager {
|
|
|
754
754
|
*/
|
|
755
755
|
on(event: "playerDestroy", listener: (player: Player) => void): this;
|
|
756
756
|
/**
|
|
757
|
-
* Emitted when
|
|
758
|
-
*
|
|
757
|
+
* Emitted when the state of the player has been changed.
|
|
758
|
+
* https://github.com/Blackfort-Hosting/magmastream/issues/16
|
|
759
|
+
* @event Manager#playerStateUpdate
|
|
759
760
|
*/
|
|
760
|
-
on(event: "
|
|
761
|
+
on(event: "playerStateUpdate", listener: (player: Player) => void): this;
|
|
761
762
|
/**
|
|
762
763
|
* Emitted when a player is moved to a new voice channel.
|
|
763
764
|
* @event Manager#playerMove
|
|
@@ -768,6 +769,16 @@ interface Manager {
|
|
|
768
769
|
* @event Manager#playerDisconnect
|
|
769
770
|
*/
|
|
770
771
|
on(event: "playerDisconnect", listener: (player: Player, oldChannel: string) => void): this;
|
|
772
|
+
/**
|
|
773
|
+
* Emitted when a player queue ends.
|
|
774
|
+
* @event Manager#queueEnd
|
|
775
|
+
*/
|
|
776
|
+
on(event: "queueEnd", listener: (player: Player, track: Track | UnresolvedTrack, payload: TrackEndEvent) => void): this;
|
|
777
|
+
/**
|
|
778
|
+
* Emitted when a voice connection is closed.
|
|
779
|
+
* @event Manager#socketClosed
|
|
780
|
+
*/
|
|
781
|
+
on(event: "socketClosed", listener: (player: Player, payload: WebSocketClosedEvent) => void): this;
|
|
771
782
|
/**
|
|
772
783
|
* Emitted when a track starts.
|
|
773
784
|
* @event Manager#trackStart
|
|
@@ -788,11 +799,6 @@ interface Manager {
|
|
|
788
799
|
* @event Manager#trackError
|
|
789
800
|
*/
|
|
790
801
|
on(event: "trackError", listener: (player: Player, track: Track | UnresolvedTrack, payload: TrackExceptionEvent) => void): this;
|
|
791
|
-
/**
|
|
792
|
-
* Emitted when a voice connection is closed.
|
|
793
|
-
* @event Manager#socketClosed
|
|
794
|
-
*/
|
|
795
|
-
on(event: "socketClosed", listener: (player: Player, payload: WebSocketClosedEvent) => void): this;
|
|
796
802
|
}
|
|
797
803
|
/**
|
|
798
804
|
* The main hub for interacting with Lavalink and using Magmastream,
|
|
@@ -247,6 +247,7 @@ class Player {
|
|
|
247
247
|
this.queueRepeat = false;
|
|
248
248
|
this.dynamicRepeat = false;
|
|
249
249
|
}
|
|
250
|
+
this.manager.emit("playerStateUpdate", this);
|
|
250
251
|
return this;
|
|
251
252
|
}
|
|
252
253
|
/**
|
|
@@ -266,6 +267,7 @@ class Player {
|
|
|
266
267
|
this.queueRepeat = false;
|
|
267
268
|
this.dynamicRepeat = false;
|
|
268
269
|
}
|
|
270
|
+
this.manager.emit("playerStateUpdate", this);
|
|
269
271
|
return this;
|
|
270
272
|
}
|
|
271
273
|
/**
|
|
@@ -300,6 +302,7 @@ class Player {
|
|
|
300
302
|
this.queueRepeat = false;
|
|
301
303
|
this.dynamicRepeat = false;
|
|
302
304
|
}
|
|
305
|
+
this.manager.emit("playerStateUpdate", this);
|
|
303
306
|
return this;
|
|
304
307
|
}
|
|
305
308
|
/** Restarts the current track to the start. */
|
|
@@ -349,6 +352,7 @@ class Player {
|
|
|
349
352
|
paused: pause,
|
|
350
353
|
},
|
|
351
354
|
});
|
|
355
|
+
this.manager.emit("playerStateUpdate", this);
|
|
352
356
|
return this;
|
|
353
357
|
}
|
|
354
358
|
/** Go back to the previous song. */
|