Enum AttachmentFlag

java.lang.Object
java.lang.Enum<AttachmentFlag>
net.dv8tion.jda.api.entities.messages.AttachmentFlag
All Implemented Interfaces:
Serializable, Comparable<AttachmentFlag>

public enum AttachmentFlag extends Enum<AttachmentFlag>
The flags for a Message Attachment.
  • Enum Constant Details

    • IS_CLIP

      public static final AttachmentFlag IS_CLIP
      This attachment is a clip from a stream
    • IS_THUMBNAIL

      public static final AttachmentFlag IS_THUMBNAIL
      This attachment is the thumbnail of a thread in a MediaChannel, displayed in the grid but not on the message
    • IS_REMIX

      public static final AttachmentFlag IS_REMIX
      This attachment is edited using the remix feature on mobile
    • IS_SPOILER

      public static final AttachmentFlag IS_SPOILER
      This attachment is marked as a spoiler and is blurred until clicked
    • IS_ANIMATED

      public static final AttachmentFlag IS_ANIMATED
      This attachment is an animated image
  • Method Details

    • values

      public static AttachmentFlag[] 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 AttachmentFlag 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
    • getRaw

      public int getRaw()
      The raw value used by Discord for this flag.
      Returns:
      The raw value
    • fromBitField

      @Nonnull public static EnumSet<AttachmentFlag> fromBitField(int bitset)
      Converts a bitfield to an EnumSet of AttachmentFlag values.
      Parameters:
      bitset - the bit field representing a set of attachment flags
      Returns:
      EnumSet containing the attachment flags corresponding to the specified bit field