Enum Message.MessageFlag

java.lang.Object
java.lang.Enum<Message.MessageFlag>
net.dv8tion.jda.api.entities.Message.MessageFlag
All Implemented Interfaces:
Serializable, Comparable<Message.MessageFlag>
Enclosing interface:
Message

public static enum Message.MessageFlag extends Enum<Message.MessageFlag>
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 Details

    • CROSSPOSTED

      public static final Message.MessageFlag CROSSPOSTED
      The Message has been published to subscribed Channels (via Channel Following)
    • IS_CROSSPOST

      public static final Message.MessageFlag IS_CROSSPOST
      The Message originated from a Message in another Channel (via Channel Following)
    • EMBEDS_SUPPRESSED

      public static final Message.MessageFlag EMBEDS_SUPPRESSED
      Embeds are suppressed on the Message.
      See Also:
    • SOURCE_MESSAGE_DELETED

      public static final Message.MessageFlag SOURCE_MESSAGE_DELETED
      Indicates, that the source message of this crosspost was deleted. This should only be possible in combination with IS_CROSSPOST
    • URGENT

      public static final Message.MessageFlag URGENT
      Indicates, that this Message came from the urgent message system
    • EPHEMERAL

      public static final Message.MessageFlag EPHEMERAL
      Indicates, that this Message is ephemeral, the Message is only visible to the bot and the interacting user
      See Also:
    • LOADING

      public static final Message.MessageFlag LOADING
      Indicates, that this Message is an interaction response and the bot is "thinking"
    • NOTIFICATIONS_SUPPRESSED

      public static final Message.MessageFlag NOTIFICATIONS_SUPPRESSED
      Indicates, that this message will not trigger push and desktop notifications
      See Also:
    • IS_VOICE_MESSAGE

      public static final Message.MessageFlag IS_VOICE_MESSAGE
      The Message is a voice message, containing an audio attachment
  • Method Details

    • values

      public static Message.MessageFlag[] 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

      public static Message.MessageFlag 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 name
      NullPointerException - 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

      @Nonnull public static 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 MessageFlags
      Parameters:
      bitfield - Non-Negative integer representing a bitfield of MessageFlags
      Returns:
      Never-Null EnumSet of MessageFlags being found in the bitfield
    • toBitField

      public static int toBitField(@Nonnull Collection<Message.MessageFlag> coll)
      Converts a Collection of MessageFlags back to the integer representing the bitfield. This is the reverse operation of fromBitField(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 is null