Good and simple script. For my personal uses, when I ask for a disconnection, I don't want it to reconnect automatically. It's more for errors when the bot is disconnected by the backend and it does not return for any reason. If the disconnect event portion of the script could be configurable it would be perfect for me.