-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Make use of discord.VoiceProtocol instead of socket_response #99
Conversation
It seems we only use it here: Which can probably be replaced with |
I ended up using |
It needed Player.state to works properly.
I'm testing this PR for 2 week now with my bot (9300+ guilds) and everything works fine. Thanks. |
Sending that here so it won't be lost. There are mem leaks problems, and players state not being updated when stopped/disconnected. |
Pushed changes from latest review that @aikaterna done and was pushed on another remote. |
PR ready for review. (finally) |
It should be 0.10.0 (nvm, I see what you're saying now Life) |
This comment was marked as outdated.
This comment was marked as outdated.
2b0aa70
to
412203a
Compare
Superseded by #122 |
This PR makes use of
discord.VoiceProtocol
instead of listening tosocket_response
event. Which will be useful for next discord.py major release where that event no longer exists unless you pass a parameter to Client.But it also makes things more "cleaner", as it "bind" the Red Lavalink
Player
object todiscord.Guild
object (guild.voice_client
).Though it comes with several breaking changes, that might break on current implementations of Red-Lavalink (in the case of Red's audio it doesn't seems to be a lot).
Breaking changes:
player_manager.PlayerManager
no longer exists. The needed methods are now innode.Node
.Player.manager
no longer exists too,node.Node
can be accessed instead.Node.player_manager
too.voice_ws_func
parameter is no longer needed to be passed innode.Node
, and therefore theget_voice_ws
method has been removed too.player_manager.user_id
&player_manager.channel_finder_func
are removed.RESTClient
now takesPlayer
instead ofNode
as parameter.rest_api.reset_session
&rest_api.close
methods are removed.Fixes #98 & closes #97.