Package net.dv8tion.jda.api
Enum Region
- java.lang.Object
-
- java.lang.Enum<Region>
-
- net.dv8tion.jda.api.Region
-
- All Implemented Interfaces:
Serializable
,Comparable<Region>
public enum Region extends Enum<Region>
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Region
fromKey(String key)
Retrieves theRegion
based on the provided key.String
getEmoji()
The unicode flag representative of this Region.String
getKey()
The Region key as defined by Discord.String
getName()
The human readable region name.boolean
isVip()
Whether or not this Region is a VIP region.String
toString()
static Region
valueOf(String name)
Returns the enum constant of this type with the specified name.static Region[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AMSTERDAM
public static final Region AMSTERDAM
-
BRAZIL
public static final Region BRAZIL
-
EUROPE
public static final Region EUROPE
-
EU_CENTRAL
public static final Region EU_CENTRAL
-
EU_WEST
public static final Region EU_WEST
-
FRANKFURT
public static final Region FRANKFURT
-
HONG_KONG
public static final Region HONG_KONG
-
JAPAN
public static final Region JAPAN
-
LONDON
public static final Region LONDON
-
RUSSIA
public static final Region RUSSIA
-
INDIA
public static final Region INDIA
-
SINGAPORE
public static final Region SINGAPORE
-
SOUTH_AFRICA
public static final Region SOUTH_AFRICA
-
SYDNEY
public static final Region SYDNEY
-
US_CENTRAL
public static final Region US_CENTRAL
-
US_EAST
public static final Region US_EAST
-
US_SOUTH
public static final Region US_SOUTH
-
US_WEST
public static final Region US_WEST
-
VIP_AMSTERDAM
public static final Region VIP_AMSTERDAM
-
VIP_BRAZIL
public static final Region VIP_BRAZIL
-
VIP_EU_CENTRAL
public static final Region VIP_EU_CENTRAL
-
VIP_EU_WEST
public static final Region VIP_EU_WEST
-
VIP_FRANKFURT
public static final Region VIP_FRANKFURT
-
VIP_JAPAN
public static final Region VIP_JAPAN
-
VIP_LONDON
public static final Region VIP_LONDON
-
VIP_SINGAPORE
public static final Region VIP_SINGAPORE
-
VIP_SOUTH_AFRICA
public static final Region VIP_SOUTH_AFRICA
-
VIP_SYDNEY
public static final Region VIP_SYDNEY
-
VIP_US_CENTRAL
public static final Region VIP_US_CENTRAL
-
VIP_US_EAST
public static final Region VIP_US_EAST
-
VIP_US_SOUTH
public static final Region VIP_US_SOUTH
-
VIP_US_WEST
public static final Region VIP_US_WEST
-
UNKNOWN
public static final Region UNKNOWN
-
-
Method Detail
-
values
public static Region[] 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 (Region c : Region.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Region 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 nameNullPointerException
- if the argument is null
-
getName
@Nonnull public String getName()
The human readable region name.- Returns:
- The name of this region
-
getKey
@Nonnull public String getKey()
The Region key as defined by Discord.- Returns:
- The key (internal name) of this region
-
getEmoji
@Nonnull public String getEmoji()
The unicode flag representative of this Region.- Returns:
- Possibly-null unicode for the region's flag
-
isVip
public boolean isVip()
Whether or not this Region is a VIP region.
VIP regions have special perks like higher bitrate in VoiceChannels and priority during times of high Discord usage.- Returns:
- True if this region is a VIP audio region.
-
fromKey
@Nonnull public static Region fromKey(@Nullable String key)
Retrieves theRegion
based on the provided key.
-
-