I have a cog that does some audio stuff. It stores the voice state in self.voice whenever the voice state updates (and limits actually updating it to when member is the bot.
But when the bot stops and reruns (like killing the python process), it stays connected to the voice channel for several minutes before timing out and disconnecting. I can't disconnect it manually because self.voice is just None initially.
Is there a way to get the current voice state when the bot is run again, so I can set self.voice? Alternatively, is there a way to immediately force disconnect the bot from any voice channels it's still in after restarting?