Package net.dv8tion.jda.api.entities
Enum Message.MessageFlag
- All Implemented Interfaces:
Serializable
,Comparable<Message.MessageFlag>
- Enclosing interface:
- Message
Enum representing the flags on a Message.
Note: The Values defined in this Enum are not considered final and only represent the current State of known Flags.
-
Enum Constant Summary
Enum ConstantDescriptionThe Message has been published to subscribed Channels (via Channel Following)Embeds are suppressed on the Message.Indicates, that this Message is ephemeral, the Message is only visible to the bot and the interacting userThe Message originated from a Message in another Channel (via Channel Following)Indicates, that this Message is an interaction response and the bot is "thinking"Indicates, that the source message of this crosspost was deleted.Indicates, that this Message came from the urgent message system -
Method Summary
Modifier and TypeMethodDescriptionstatic EnumSet<Message.MessageFlag>
fromBitField
(int bitfield) Given a bitfield, this function extracts all Enum values according to their bit values and returns an EnumSet containing all matching MessageFlagsint
getValue()
Returns the value of the MessageFlag as represented in the bitfield.static int
Converts a Collection of MessageFlags back to the integer representing the bitfield.static Message.MessageFlag
Returns the enum constant of this type with the specified name.static Message.MessageFlag[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CROSSPOSTED
The Message has been published to subscribed Channels (via Channel Following) -
IS_CROSSPOST
The Message originated from a Message in another Channel (via Channel Following) -
EMBEDS_SUPPRESSED
Embeds are suppressed on the Message.- See Also:
-
SOURCE_MESSAGE_DELETED
Indicates, that the source message of this crosspost was deleted. This should only be possible in combination withIS_CROSSPOST
-
URGENT
Indicates, that this Message came from the urgent message system -
EPHEMERAL
Indicates, that this Message is ephemeral, the Message is only visible to the bot and the interacting user- See Also:
-
LOADING
Indicates, that this Message is an interaction response and the bot is "thinking"
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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()Returns the value of the MessageFlag as represented in the bitfield. It is always a power of 2 (single bit)- Returns:
- Non-Zero bit value of the field
-
fromBitField
Given a bitfield, this function extracts all Enum values according to their bit values and returns an EnumSet containing all matching MessageFlags- Parameters:
bitfield
- Non-Negative integer representing a bitfield of MessageFlags- Returns:
- Never-Null EnumSet of MessageFlags being found in the bitfield
-
toBitField
Converts a Collection of MessageFlags back to the integer representing the bitfield. This is the reverse operation offromBitField(int)
.- Parameters:
coll
- A Non-Null Collection of MessageFlags- Returns:
- Integer value of the bitfield representing the given MessageFlags
- Throws:
IllegalArgumentException
- If the provided Collection isnull
-