DisconnectEvent
Types
A Gateway was detached, all resources tied to that gateway should be freed.
Discord closed the connection with a closeCode.
Discord requested a reconnect, the gateway will close and attempt to resume the session.
The Gateway has failed to establish a connection too many times and will not try to reconnect anymore. The user is free to manually connect again using Gateway.start, otherwise all resources linked to the Gateway should free and the Gateway detached.
The gateway closed and will attempt to start a new session.
The connection was closed because of a timeout, probably due to a loss of internet connection.
The user closed the Gateway connection.
Discord is no longer responding to the gateway commands, the connection will be closed and an attempt to resume the session will be made. Any commands send recently might not complete, and won't be automatically requeued.