Package discord4j.core.object.entity
Enum Message.Type
- java.lang.Object
-
- java.lang.Enum<Message.Type>
-
- discord4j.core.object.entity.Message.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<Message.Type>
- Enclosing class:
- Message
public static enum Message.Type extends Enum<Message.Type>
Represents the various types of messages.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPLICATION_COMMAND
CALL
A message created when a call was started.CHANNEL_FOLLOW_ADD
A message created when a user follows a channel from another guild into specific channel ( Server Following).CHANNEL_ICON_CHANGE
A message created when a channel's icon changed.CHANNEL_NAME_CHANGE
A message created when a channel's name changed.CHANNEL_PINNED_MESSAGE
A message created when a message was pinned.DEFAULT
A message created by a user.GUILD_DISCOVERY_DISQUALIFIED
A message created when the Guild is disqualified for Discovery FeatureGUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING
GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING
GUILD_DISCOVERY_REQUALIFIED
A message created when the Guild is requalified for Discovery FeatureGUILD_INVITE_REMINDER
GUILD_MEMBER_JOIN
A message created when an user joins a guild.RECIPIENT_ADD
A message created when a recipient was added to a DM.RECIPIENT_REMOVE
A message created when a recipient left a DM.REPLY
A message created with a replyUNKNOWN
Unknown type.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.
-
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 Message.Type
of(int value)
Gets the type of message.static Message.Type
valueOf(String name)
Returns the enum constant of this type with the specified name.static Message.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 Message.Type UNKNOWN
Unknown type.
-
DEFAULT
public static final Message.Type DEFAULT
A message created by a user.
-
RECIPIENT_ADD
public static final Message.Type RECIPIENT_ADD
A message created when a recipient was added to a DM.
-
RECIPIENT_REMOVE
public static final Message.Type RECIPIENT_REMOVE
A message created when a recipient left a DM.
-
CALL
public static final Message.Type CALL
A message created when a call was started.
-
CHANNEL_NAME_CHANGE
public static final Message.Type CHANNEL_NAME_CHANGE
A message created when a channel's name changed.
-
CHANNEL_ICON_CHANGE
public static final Message.Type CHANNEL_ICON_CHANGE
A message created when a channel's icon changed.
-
CHANNEL_PINNED_MESSAGE
public static final Message.Type CHANNEL_PINNED_MESSAGE
A message created when a message was pinned.
-
GUILD_MEMBER_JOIN
public static final Message.Type GUILD_MEMBER_JOIN
A message created when an user joins a guild.
-
USER_PREMIUM_GUILD_SUBSCRIPTION
public static final Message.Type USER_PREMIUM_GUILD_SUBSCRIPTION
A message created when an user boost a guild.
-
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1
public static final Message.Type 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
public static final Message.Type 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
public static final Message.Type 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
public static final Message.Type CHANNEL_FOLLOW_ADD
A message created when a user follows a channel from another guild into specific channel ( Server Following).
-
GUILD_DISCOVERY_DISQUALIFIED
public static final Message.Type GUILD_DISCOVERY_DISQUALIFIED
A message created when the Guild is disqualified for Discovery Feature
-
GUILD_DISCOVERY_REQUALIFIED
public static final Message.Type GUILD_DISCOVERY_REQUALIFIED
A message created when the Guild is requalified for Discovery Feature
-
GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING
public static final Message.Type GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING
-
GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING
public static final Message.Type GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING
-
REPLY
public static final Message.Type REPLY
A message created with a reply
-
APPLICATION_COMMAND
public static final Message.Type APPLICATION_COMMAND
-
GUILD_INVITE_REMINDER
public static final Message.Type GUILD_INVITE_REMINDER
-
-
Method Detail
-
values
public static Message.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 (Message.Type c : Message.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 Message.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 Message.Type of(int value)
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.
-
-