Enum AutoModTriggerType
- All Implemented Interfaces:
Serializable,Comparable<AutoModTriggerType>
The type which defines what triggers an
AutoModRule.-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe rule is triggered by user message content containing specific keywords or phrases.The rule is triggered by user message content containing keywords from a predefined list (such asslurs).The rule is triggered by a member profile containing specific keywords or phrases.The rule is triggered by user message content containing more than the allowed number of mentions.The rule is triggered by user message content containing classified spam content.Placeholder for unknown trigger types that haven't been added yet. -
Method Summary
Modifier and TypeMethodDescriptionstatic AutoModTriggerTypefromKey(int key) TheAutoModTriggerTypethat matches the provided key.intgetKey()The raw API key used to indicate this type.intThe maximum number of rules that can use this trigger type in a guild.TheAutoModEventTypesthat support this trigger type.booleanWhether the providedAutoModEventTypeis supported by this trigger type.static AutoModTriggerTypeReturns the enum constant of this type with the specified name.static AutoModTriggerType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
KEYWORD
The rule is triggered by user message content containing specific keywords or phrases. -
SPAM
The rule is triggered by user message content containing classified spam content. -
KEYWORD_PRESET
The rule is triggered by user message content containing keywords from a predefined list (such asslurs). -
MENTION_SPAM
The rule is triggered by user message content containing more than the allowed number of mentions. -
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
Placeholder for unknown trigger types that haven't been added yet.
-
-
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 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
TheAutoModEventTypesthat support this trigger type.- Returns:
- The supported event types
-
isEventTypeSupported
Whether the providedAutoModEventTypeis supported by this trigger type.- Parameters:
type- The event type to check- Returns:
- True, if the event type is supported
-
fromKey
TheAutoModTriggerTypethat matches the provided key.- Parameters:
key- The key to match- Returns:
- The matching
AutoModTriggerTypeorUNKNOWN
-