Enum ClientType

java.lang.Object
java.lang.Enum<ClientType>
net.dv8tion.jda.api.entities.ClientType
All Implemented Interfaces:
Serializable, Comparable<ClientType>

public enum ClientType extends Enum<ClientType>
The type of client a user might be active on.
See Also:
  • Enum Constant Details

    • DESKTOP

      public static final ClientType DESKTOP
      The official discord desktop client
    • MOBILE

      public static final ClientType MOBILE
      The official discord mobile app
    • WEB

      public static final ClientType WEB
      Discord from the browser (or bot)
    • UNKNOWN

      public static final ClientType UNKNOWN
      Placeholder for a new type that is not yet supported here
  • Method Details

    • values

      public static ClientType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ClientType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • getKey

      @Nonnull public String getKey()
      The raw key used by the API to identify this type
      Returns:
      The raw key
    • fromKey

      @Nonnull public static ClientType fromKey(@Nonnull String key)
      Resolves the provided raw API key to the enum constant.
      Parameters:
      key - The api key to check
      Returns:
      The resolved ClientType or UNKNOWN