Package org.javacord.api.entity.message
Enum MessageFlag
- java.lang.Object
-
- java.lang.Enum<MessageFlag>
-
- org.javacord.api.entity.message.MessageFlag
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<MessageFlag>
public enum MessageFlag extends java.lang.Enum<MessageFlag>
Represents a message flag type.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CROSSPOSTEDThis message has been published to subscribed channels (via Channel Following).EPHEMERALThis message is only visible to the user who invoked the Interaction.FAILED_TO_MENTION_SOME_ROLES_IN_THREADThis message failed to mention some roles and add their members to the thread.HAS_THREADThis message has an associated thread, with the same id as the message.IS_CROSSPOSTThis message originated from a message in another channel (via Channel Following).LOADINGThis message is an Interaction Response and the bot is "thinking".SOURCE_MESSAGE_DELETEDThe source message for this crosspost has been deleted (via Channel Following).SUPPRESS_EMBEDSDo not include any embeds when serializing this message.UNKNOWNAn unknown flag.URGENTThis message came from the urgent message system.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MessageFlaggetFlagTypeById(int id)Gets the message flag type by its id.intgetId()Gets the id of the message flag type.static MessageFlagvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static MessageFlag[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CROSSPOSTED
public static final MessageFlag CROSSPOSTED
This message has been published to subscribed channels (via Channel Following).
-
IS_CROSSPOST
public static final MessageFlag IS_CROSSPOST
This message originated from a message in another channel (via Channel Following).
-
SUPPRESS_EMBEDS
public static final MessageFlag SUPPRESS_EMBEDS
Do not include any embeds when serializing this message.
-
SOURCE_MESSAGE_DELETED
public static final MessageFlag SOURCE_MESSAGE_DELETED
The source message for this crosspost has been deleted (via Channel Following).
-
URGENT
public static final MessageFlag URGENT
This message came from the urgent message system.
-
HAS_THREAD
public static final MessageFlag HAS_THREAD
This message has an associated thread, with the same id as the message.
-
EPHEMERAL
public static final MessageFlag EPHEMERAL
This message is only visible to the user who invoked the Interaction.
-
LOADING
public static final MessageFlag LOADING
This message is an Interaction Response and the bot is "thinking".
-
FAILED_TO_MENTION_SOME_ROLES_IN_THREAD
public static final MessageFlag FAILED_TO_MENTION_SOME_ROLES_IN_THREAD
This message failed to mention some roles and add their members to the thread.
-
UNKNOWN
public static final MessageFlag UNKNOWN
An unknown flag.
-
-
Method Detail
-
values
public static MessageFlag[] 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 (MessageFlag c : MessageFlag.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MessageFlag 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.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getId
public int getId()
Gets the id of the message flag type.- Returns:
- The id of the message flag type.
-
getFlagTypeById
public static MessageFlag getFlagTypeById(int id)
Gets the message flag type by its id.- Parameters:
id- The id of the message flag type.- Returns:
- The message flag type with the given id or
UNKNOWNif unknown id.
-
-