Package discord4j.core.object.entity
Enum Class Message.Type
- All Implemented Interfaces:
Serializable
,Comparable<Message.Type>
,Constable
- Enclosing class:
- Message
Represents the various types of messages.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA message created using an application (like slash commands)A message created when a call was started.A message created when a user follows a channel from another guild into specific channel ( Server Following).A message created when a channel's icon changed.A message created when a channel's name changed.A message created when a message was pinned.A message created by a user.A message created when the Guild is disqualified for Discovery FeatureA message created for last warning about the grace period of Guild DiscoveryA message created for warning about the grace period of Guild DiscoveryA message created when the Guild is requalified for Discovery FeatureA message created for notice the servers owners about invite new users (only in new servers)A message created when an user joins a guild.A message created when a recipient was added to a DM.A message created when a recipient left a DM.A message created with a replyA message created when a Thread is started ( Threads )The first message in a thread pointing to a related message in the parent channel from which the thread was started
Note: Only supported from v9 of APIUnknown type.A message created when an user boost a guild.A message created when an user boost a guild and the guild reach the tier 1.A message created when an user boost a guild and the guild reach the tier 2.A message created when an user boost a guild and the guild reach the tier 3. -
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
Gets the underlying value as represented by Discord.static Message.Type
of
(int value) Gets the type of message.static Message.Type
Returns the enum constant of this class with the specified name.static Message.Type[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
Unknown type. -
DEFAULT
A message created by a user. -
RECIPIENT_ADD
A message created when a recipient was added to a DM. -
RECIPIENT_REMOVE
A message created when a recipient left a DM. -
CALL
A message created when a call was started. -
CHANNEL_NAME_CHANGE
A message created when a channel's name changed. -
CHANNEL_ICON_CHANGE
A message created when a channel's icon changed. -
CHANNEL_PINNED_MESSAGE
A message created when a message was pinned. -
GUILD_MEMBER_JOIN
A message created when an user joins a guild. -
USER_PREMIUM_GUILD_SUBSCRIPTION
A message created when an user boost a guild. -
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1
A message created when an user boost a guild and the guild reach the tier 1. -
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2
A message created when an user boost a guild and the guild reach the tier 2. -
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3
A message created when an user boost a guild and the guild reach the tier 3. -
CHANNEL_FOLLOW_ADD
A message created when a user follows a channel from another guild into specific channel ( Server Following). -
GUILD_DISCOVERY_DISQUALIFIED
A message created when the Guild is disqualified for Discovery Feature -
GUILD_DISCOVERY_REQUALIFIED
A message created when the Guild is requalified for Discovery Feature -
GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING
A message created for warning about the grace period of Guild Discovery -
GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING
A message created for last warning about the grace period of Guild Discovery -
THREAD_CREATED
A message created when a Thread is started ( Threads ) -
REPLY
A message created with a reply -
APPLICATION_COMMAND
A message created using an application (like slash commands) -
THREAD_STARTER_MESSAGE
The first message in a thread pointing to a related message in the parent channel from which the thread was started
Note: Only supported from v9 of API -
GUILD_INVITE_REMINDER
A message created for notice the servers owners about invite new users (only in new servers) -
CONTEXT_MENU_COMMAND
-
AUTO_MODERATION_ACTION
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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
Gets the type of message. It is guaranteed that invokinggetValue()
from the returned enum will be equal (==
) to the suppliedvalue
.- Parameters:
value
- The underlying value as represented by Discord.- Returns:
- The type of message.
-