Package net.dv8tion.jda.api.entities
Enum ClientType
- java.lang.Object
-
- java.lang.Enum<ClientType>
-
- net.dv8tion.jda.api.entities.ClientType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ClientType>
public enum ClientType extends java.lang.Enum<ClientType>
The type of client a user might be active on.- See Also:
Member.getOnlineStatus(type)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClientType
fromKey(java.lang.String key)
Resolves the provided raw API key to the enum constant.java.lang.String
getKey()
The raw key used by the API to identify this typestatic ClientType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ClientType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getKey
public java.lang.String getKey()
The raw key used by the API to identify this type- Returns:
- The raw key
-
fromKey
@Nonnull public static ClientType fromKey(@Nonnull java.lang.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
-
-