-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DisposeOnDisconnect #18
Comments
You mean you do not know in which channel the player was before disconnecting because the player resets the voice channel? How about a "PlayerDisconnectEvent" which contains the voice channel the player disconnected from? |
Yes, that would work too. |
Okay, I've implemented the "PlayerDisconnected" and "PlayerConnected" (in f4de3f6) which both hold the voice channel identifier connected to/disconnected from. The "PlayerDisconnected" also holds a cause which indicates the reason why the player disconnected (see possible causes: PlayerDisconnectCause.cs). |
Awesome, I can't wait to try it. |
👌 Package (v1.4.6) is publishing 😊 Thanks! PR: #19 |
Add a DisposeOnDisconnect bool in LavalinkNodeOptions (or another name).
Reason: As I can see if someone disconnects the bot through Discord (by having the permission) the player gets disposed and removed from the players dictionary.
But, I already made my own method to check if the bot was disconnected forcefully, so I can send a message in the music output channel. I can dispose the player then manually. But the event from the library gets triggered first before mine.
Can you add this option and some checks in your VoiceStateUpdated event?
The text was updated successfully, but these errors were encountered: