Enum AutoModResponse.Type

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

public static enum AutoModResponse.Type extends Enum<AutoModResponse.Type>
The type of response.
  • Enum Constant Details

    • BLOCK_MESSAGE

      public static final AutoModResponse.Type BLOCK_MESSAGE
      Blocks the message from being sent.
    • SEND_ALERT_MESSAGE

      public static final AutoModResponse.Type SEND_ALERT_MESSAGE
      Sends an alert message to the specified channel.
    • TIMEOUT

      public static final AutoModResponse.Type TIMEOUT
      Times out the user for the specified duration.

      To create a rule with this response, the creator must also have the MODERATE_MEMBERS permission.

    • BLOCK_MEMBER_INTERACTION

      @Incubating public static final AutoModResponse.Type BLOCK_MEMBER_INTERACTION
      Blocks the member from interacting with the guild until they update the offending content.
      Incubating:
      This has not been officially released yet
    • UNKNOWN

      public static final AutoModResponse.Type UNKNOWN
      Placeholder for unknown types.
  • Method Details

    • values

      public static AutoModResponse.Type[] 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 AutoModResponse.Type 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 value used by Discord to represent this type.
      Returns:
      The raw value
    • getSupportedTypes

      @Nonnull public EnumSet<AutoModTriggerType> getSupportedTypes()
      The AutoModTriggerTypes that this response supports.
      Returns:
      The supported trigger types
    • isSupportedTrigger

      public boolean isSupportedTrigger(@Nonnull AutoModTriggerType type)
      Whether this response supports the provided trigger type.
      Parameters:
      type - The trigger type
      Returns:
      True, if this response supports the provided trigger type
      Throws:
      IllegalArgumentException - If the provided trigger type is null
    • fromKey

      @Nonnull public static AutoModResponse.Type fromKey(int key)
      The AutoModResponse.Type represented by the provided key.
      Parameters:
      key - The raw key
      Returns:
      The AutoModResponse.Type or UNKNOWN