Package com.mewna.catnip.shard
Enum Class GatewayCloseCode
- All Implemented Interfaces:
Serializable
,Comparable<GatewayCloseCode>
,Constable
Discord-specific websocket gateway close codes. These are sent by the
gateway when we do something bad that's within the scope of what the gateway
handles. This just copies the error messages directly from the docs because
I think that they're probably good enough.
See also: https://discord.com/developers/docs/topics/opcodes-and-status-codes
- Since:
- 11/19/18.
- Author:
- amy
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic GatewayCloseCode
byId
(int id) int
code()
message()
static GatewayCloseCode
Returns the enum constant of this class with the specified name.static GatewayCloseCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN_ERROR
-
UNKNOWN_OPCODE
-
DECODE_ERROR
-
NOT_AUTHENTICATED
-
AUTHENTICATION_FAILED
-
ALREADY_AUTHENTICATED
-
INVALID_SEQ
-
RATE_LIMITED
-
SESSION_TIMEOUT
-
INVALID_SHARD
-
SHARDING_REQUIRED
-
INVALID_VERSION
-
INVALID_INTENTS
-
DISALLOWED_INTENTS
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
byId
-
code
public int code() -
message
-