java.io.Serializable
, java.lang.Comparable<Guild.Timeout>
public static enum Guild.Timeout extends java.lang.Enum<Guild.Timeout>
VoiceChannel
if one is set
(Guild.getAfkChannel()
).Enum Constant | Description |
---|---|
SECONDS_1800 |
|
SECONDS_300 |
|
SECONDS_3600 |
|
SECONDS_60 |
|
SECONDS_900 |
Modifier and Type | Method | Description |
---|---|---|
static Guild.Timeout |
fromKey(int seconds) |
Retrieves the
Timeout based on the amount of seconds requested. |
int |
getSeconds() |
The amount of seconds represented by this
Guild.Timeout . |
static Guild.Timeout |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static Guild.Timeout[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Guild.Timeout SECONDS_60
public static final Guild.Timeout SECONDS_300
public static final Guild.Timeout SECONDS_900
public static final Guild.Timeout SECONDS_1800
public static final Guild.Timeout SECONDS_3600
public static Guild.Timeout[] values()
for (Guild.Timeout c : Guild.Timeout.values()) System.out.println(c);
public static Guild.Timeout valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getSeconds()
Guild.Timeout
.public static Guild.Timeout fromKey(int seconds)
Timeout
based on the amount of seconds requested.
seconds
amount provided is not valid for Discord, an IllegalArgumentException will be thrown.seconds
- The amount of seconds before idle timeout.Timeout
related to the amount of seconds provided.java.lang.IllegalArgumentException
- If the provided seconds
is an invalid timeout amount.