Enum Class GatewayCloseCode

java.lang.Object
java.lang.Enum<GatewayCloseCode>
com.mewna.catnip.shard.GatewayCloseCode
All Implemented Interfaces:
Serializable, Comparable<GatewayCloseCode>, Constable

public enum GatewayCloseCode extends Enum<GatewayCloseCode>
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
  • Enum Constant Details

  • Method Details

    • values

      public static GatewayCloseCode[] 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

      public static GatewayCloseCode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • byId

      public static GatewayCloseCode byId(@Nonnegative int id)
    • code

      public int code()
    • message

      public String message()