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>
Represents the Regions used for Audio connections.
This is used by AudioChannels to define where the audio server that hosts the AudioChannel is located.
  • Enum Constant Details

    • BRAZIL

      public static final Region BRAZIL
    • HONG_KONG

      public static final Region HONG_KONG
    • INDIA

      public static final Region INDIA
    • JAPAN

      public static final Region JAPAN
    • MILAN

      public static final Region MILAN
    • ROTTERDAM

      public static final Region ROTTERDAM
    • RUSSIA

      public static final Region RUSSIA
    • SINGAPORE

      public static final Region SINGAPORE
    • SOUTH_AFRICA

      public static final Region SOUTH_AFRICA
    • SOUTH_KOREA

      public static final Region SOUTH_KOREA
    • 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_BRAZIL

      public static final Region VIP_BRAZIL
    • VIP_HONG_KONG

      public static final Region VIP_HONG_KONG
    • VIP_INDIA

      public static final Region VIP_INDIA
    • VIP_JAPAN

      public static final Region VIP_JAPAN
    • VIP_MILAN

      public static final Region VIP_MILAN
    • VIP_ROTTERDAM

      public static final Region VIP_ROTTERDAM
    • VIP_RUSSIA

      public static final Region VIP_RUSSIA
    • VIP_SINGAPORE

      public static final Region VIP_SINGAPORE
    • VIP_SOUTH_AFRICA

      public static final Region VIP_SOUTH_AFRICA
    • VIP_SOUTH_KOREA

      public static final Region VIP_SOUTH_KOREA
    • 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
    • AUTOMATIC

      public static final Region AUTOMATIC
  • Method Details

    • values

      public static Region[] 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 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 name
      NullPointerException - 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

      @Nullable 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 the Region based on the provided key.
      Parameters:
      key - The key relating to the Region we wish to retrieve.
      Returns:
      The Region matching the key. If there is no match, returns UNKNOWN.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Region>