Enum Guild.Timeout

    • Method Detail

      • values

        public static Guild.Timeout[] 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 (Guild.Timeout c : Guild.Timeout.values())
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Guild.Timeout 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.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getSeconds

        public int getSeconds()
        The amount of seconds represented by this Guild.Timeout.
        An positive non-negative int representing the timeout amount in seconds.
      • fromKey

        public static Guild.Timeout fromKey​(int seconds)
        Retrieves the Timeout based on the amount of seconds requested.
        If the seconds amount provided is not valid for Discord, an IllegalArgumentException will be thrown.
        seconds - The amount of seconds before idle timeout.
        The Timeout related to the amount of seconds provided.
        java.lang.IllegalArgumentException - If the provided seconds is an invalid timeout amount.