Enum Channel.Type
- java.lang.Object
-
- java.lang.Enum<Channel.Type>
-
- discord4j.core.object.entity.channel.Channel.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<Channel.Type>
- Enclosing interface:
- Channel
public static enum Channel.Type extends Enum<Channel.Type>
Represents the various types of channels.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DM
Represents aPrivateChannel
.GROUP_DM
Represents a group DM.GUILD_CATEGORY
Represents aCategory
.GUILD_NEWS
Represents aNewsChannel
.GUILD_STAGE_VOICE
Represents aVoiceChannel
for hosting events with an audience.GUILD_STORE
Represents aStoreChannel
.GUILD_TEXT
Represents aTextChannel
.GUILD_VOICE
Represents aVoiceChannel
.UNKNOWN
Unknown type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getValue()
Gets the underlying value as represented by Discord.static Channel.Type
of(int value)
Gets the type of channel.static Channel.Type
valueOf(String name)
Returns the enum constant of this type with the specified name.static Channel.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final Channel.Type UNKNOWN
Unknown type.
-
GUILD_TEXT
public static final Channel.Type GUILD_TEXT
Represents aTextChannel
.
-
DM
public static final Channel.Type DM
Represents aPrivateChannel
.
-
GUILD_VOICE
public static final Channel.Type GUILD_VOICE
Represents aVoiceChannel
.
-
GROUP_DM
public static final Channel.Type GROUP_DM
Represents a group DM.
-
GUILD_CATEGORY
public static final Channel.Type GUILD_CATEGORY
Represents aCategory
.
-
GUILD_NEWS
public static final Channel.Type GUILD_NEWS
Represents aNewsChannel
.
-
GUILD_STORE
public static final Channel.Type GUILD_STORE
Represents aStoreChannel
.
-
GUILD_STAGE_VOICE
public static final Channel.Type GUILD_STAGE_VOICE
Represents aVoiceChannel
for hosting events with an audience.
-
-
Method Detail
-
values
public static Channel.Type[] 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 (Channel.Type c : Channel.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Channel.Type 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 nameNullPointerException
- if the argument is null
-
getValue
public int getValue()
Gets the underlying value as represented by Discord.- Returns:
- The underlying value as represented by Discord.
-
of
public static Channel.Type of(int value)
Gets the type of channel. It is guaranteed that invokinggetValue()
from the returned enum will equal (==
) the suppliedvalue
.- Parameters:
value
- The underlying value as represented by Discord.- Returns:
- The type of channel.
-
-