Enum ClientType

    • Enum Constant Detail

      • 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 Detail

      • values

        public static ClientType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ClientType c : ClientType.values())
            System.out.println(c);
        
        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

        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