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
[Audio] Remove players which no longer have a guild. #2414
[Audio] Remove players which no longer have a guild. #2414
Conversation
I tested this PR, but I've this error when the bot quit a guild.
|
🤦♂️ Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested it and it works well now.
redbot/cogs/audio/audio.py
Outdated
# Can result in iterator changing size during context switching. | ||
for zombie in zombie_players: | ||
await zombie.disconnect() | ||
lavalink.player_manager.players.remove(zombie) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can bump the version of red-lavalink to 0.2.2 in setup.cfg and use player.destroy()
if you'd like
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
Cleanup players when the bot has one for a guild it leaves. Bumps Red-Lavalink to v0.2.2
Type
Description of the changes
Cleanup players when the bot has one for a guild it leaves.