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
Keyword presets that can be used in
AutoModRule.getFilteredPresets()
.-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWords that can be considered as swearing or cursing.Words that can be considered as sexual in nature.Words that can be considered as slurs or insults.Placeholder for unknown values. -
Method Summary
Modifier and TypeMethodDescriptionstatic AutoModRule.KeywordPreset
fromKey
(int key) TheAutoModRule.KeywordPreset
represented by the provided key.int
getKey()
The raw value used by Discord to represent this preset.static AutoModRule.KeywordPreset
Returns the enum constant of this type with the specified name.static AutoModRule.KeywordPreset[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PROFANITY
Words that can be considered as swearing or cursing. -
SEXUAL_CONTENT
Words that can be considered as sexual in nature. -
SLURS
Words that can be considered as slurs or insults. -
UNKNOWN
Placeholder for unknown values.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getKey
public int getKey()The raw value used by Discord to represent this preset.- Returns:
- The raw value
-
fromKey
TheAutoModRule.KeywordPreset
represented by the provided key.- Parameters:
key
- The raw key- Returns:
- The
AutoModRule.KeywordPreset
orUNKNOWN
-