Enum AutoModRule.KeywordPreset

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

public static enum AutoModRule.KeywordPreset extends Enum<AutoModRule.KeywordPreset>
Keyword presets that can be used in AutoModRule.getFilteredPresets().
  • Enum Constant Details

  • Method Details

    • values

      public static AutoModRule.KeywordPreset[] 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 AutoModRule.KeywordPreset 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 preset.
      Returns:
      The raw value
    • fromKey

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