Class Region

    • Constructor Detail

      • Region

        public Region​(ServiceMediator serviceMediator,
                      RegionBean data)
        Constructs a Region with an associated ServiceMediator and Discord data.
        Parameters:
        serviceMediator - The ServiceMediator associated to this object, must be non-null.
        data - The raw data as represented by Discord, must be non-null.
    • Method Detail

      • getClient

        public DiscordClient getClient()
        Description copied from interface: DiscordObject
        Gets the DiscordClient associated to this object.
        Specified by:
        getClient in interface DiscordObject
        Returns:
        The DiscordClient associated to this object.
      • getId

        public String getId()
        Gets the unique ID for the region.
        Returns:
        The unique ID for the region.
      • getName

        public String getName()
        Gets the name of the region.
        Returns:
        The name of the region.
      • getSampleHostname

        public String getSampleHostname()
        Gets an example hostname for the region.
        Returns:
        An example hostname for the region.
      • getSamplePort

        public int getSamplePort()
        Gets an example port for the region.
        Returns:
        An example port for the region.
      • isVip

        public boolean isVip()
        Gets if this is a VIP region.
        Returns:
        true if this is a VIP region, false otherwise.
      • isOptimal

        public boolean isOptimal()
        Gets if the region is closest to the current user's serviceMediator.
        Returns:
        true if the region is closest to the current user's serviceMediator, false otherwise.
      • isDeprecated

        public boolean isDeprecated()
        Gets if this is a deprecated voice region.
        Returns:
        true if this is a deprecated voice region, false otherwise.
      • isCustom

        public boolean isCustom()
        Gets if this is a custom voice region.
        Returns:
        true if this is a custom voice region, false otherwise.