Skip to content

Fixes Lavalink Manual Disconnection Bug

Created by: Neuheit

Summary

This fixes an issue that was reported in the guild that would not allow the client to reconnect from the voice channel if it was manually disconnected.

Details

This bug is caused by the guild connection not being removed when the bot is manually disconnected. I fixed this by adding to the VoiceStateUpdate handler to check if the client has left the voice channel, and if so, remove it from the guild connections cache and disconnect it from Lavalink using the destroy payload.

Notes

I also simplified a few code segments in the handler and in the guild connection class.

Merge request reports

Loading