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

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

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

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

      public static final Region AUTOMATIC
  • Field Details

    • VOICE_CHANNEL_REGIONS

      public static final Set<Region> VOICE_CHANNEL_REGIONS
      This Set represents all regions that can be used for VoiceChannel region overrides.
  • 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>