Types

Link copied to clipboard
object Detach : Close

The Gateway was detached, all resources tied to the gateway should be freed.

Link copied to clipboard
data class DiscordClose(val closeCode: GatewayCloseCode, val recoverable: Boolean) : Close

Discord closed the connection with a closeCode.

Link copied to clipboard

The gateway closed and will attempt to resume the session.

Link copied to clipboard

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.

Link copied to clipboard

The gateway closed and will attempt to start a new session.

Link copied to clipboard
object Timeout : Close

The connection was closed because of a timeout, probably due to a loss of internet connection.

Link copied to clipboard
object UserClose : Close

The user closed the Gateway connection.

Link copied to clipboard

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.