Enum 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
      CROSSPOSTED
      This message has been published to subscribed channels (via Channel Following).
      EPHEMERAL
      This message is only visible to the user who invoked the Interaction.
      FAILED_TO_MENTION_SOME_ROLES_IN_THREAD
      This message failed to mention some roles and add their members to the thread.
      HAS_THREAD
      This message has an associated thread, with the same id as the message.
      IS_CROSSPOST
      This message originated from a message in another channel (via Channel Following).
      LOADING
      This message is an Interaction Response and the bot is "thinking".
      SOURCE_MESSAGE_DELETED
      The source message for this crosspost has been deleted (via Channel Following).
      SUPPRESS_EMBEDS
      Do not include any embeds when serializing this message.
      UNKNOWN
      An unknown flag.
      URGENT
      This message came from the urgent message system.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static MessageFlag getFlagTypeById​(int id)
      Gets the message flag type by its id.
      int getId()
      Gets the id of the message flag type.
      static MessageFlag valueOf​(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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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 name
        java.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 UNKNOWN if unknown id.