This repository has been archived by the owner on Feb 7, 2023. It is now read-only.
If the voice gateway connection is terminated unintentionally, alchemy goes into a sort of "limbo" where the bot is connected to a voice channel but not connected to the voice gateway. #85
Labels
Sorry for possibly confusing title.
If you let a bot be connected to a voice channel without doing anything in there for quite a few hours (+12 hours possibly), then eventually, the connection to the voice gateway will be terminated for some reason or the other, such as the connection being closed, timing out, or receiving a 503 error code.
Example:
07:24:13.970 [debug] Voice Gateway for guild_id disconnected, reason: {:remote, :closed}
https://github.com/cronokirby/alchemy/blob/master/lib/Voice/gateway.ex#L78-L85
This ondisconnect handler doesn't seem to properly handle this scenario, and causes the bot to fall into a sort of "limbo" where you can make the bot join different voice channels, but there's no real connection to the voice gateway anymore, thus resulting in not being able to play any audio in the voice channel. In this limbo state, the bot is visibly connected to a voice channel in the discord client.
How to reproduce the problem:
The text was updated successfully, but these errors were encountered: