Enum AutoModTriggerType

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

public enum AutoModTriggerType extends Enum<AutoModTriggerType>
The type which defines what triggers an AutoModRule.
  • Enum Constant Details

    • KEYWORD

      public static final AutoModTriggerType KEYWORD
      The rule is triggered by user message content containing specific keywords or phrases.
    • SPAM

      public static final AutoModTriggerType SPAM
      The rule is triggered by user message content containing classified spam content.
    • KEYWORD_PRESET

      public static final AutoModTriggerType KEYWORD_PRESET
      The rule is triggered by user message content containing keywords from a predefined list (such as slurs).
    • MENTION_SPAM

      public static final AutoModTriggerType MENTION_SPAM
      The rule is triggered by user message content containing more than the allowed number of mentions.
    • MEMBER_PROFILE_KEYWORD

      @Incubating public static final AutoModTriggerType MEMBER_PROFILE_KEYWORD
      The rule is triggered by a member profile containing specific keywords or phrases.
      Incubating:
      This has not been officially released yet
    • UNKNOWN

      public static final AutoModTriggerType UNKNOWN
      Placeholder for unknown trigger types that haven't been added yet.
  • Method Details

    • values

      public static AutoModTriggerType[] 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 AutoModTriggerType 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
    • getKey

      public int getKey()
      The raw API key used to indicate this type.
      Returns:
      The int key
    • getMaxPerGuild

      public int getMaxPerGuild()
      The maximum number of rules that can use this trigger type in a guild.
      Returns:
      The maximum number of rules
    • getSupportedEventTypes

      @Nonnull public EnumSet<AutoModEventType> getSupportedEventTypes()
      The AutoModEventTypes that support this trigger type.
      Returns:
      The supported event types
    • isEventTypeSupported

      public boolean isEventTypeSupported(@Nonnull AutoModEventType type)
      Whether the provided AutoModEventType is supported by this trigger type.
      Parameters:
      type - The event type to check
      Returns:
      True, if the event type is supported
    • fromKey

      @Nonnull public static AutoModTriggerType fromKey(int key)
      The AutoModTriggerType that matches the provided key.
      Parameters:
      key - The key to match
      Returns:
      The matching AutoModTriggerType or UNKNOWN