Enum AutoModTriggerType
- All Implemented Interfaces:
Serializable
,Comparable<AutoModTriggerType>
The type which defines what triggers an
AutoModRule
.-
Enum Constant Summary
Enum 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 AutoModTriggerType
fromKey
(int key) TheAutoModTriggerType
that matches the provided key.int
getKey()
The raw API key used to indicate this type.int
The maximum number of rules that can use this trigger type in a guild.TheAutoModEventTypes
that support this trigger type.boolean
Whether the providedAutoModEventType
is supported by this trigger type.static AutoModTriggerType
Returns 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
TheAutoModEventTypes
that support this trigger type.- Returns:
- The supported event types
-
isEventTypeSupported
Whether the providedAutoModEventType
is supported by this trigger type.- Parameters:
type
- The event type to check- Returns:
- True, if the event type is supported
-
fromKey
TheAutoModTriggerType
that matches the provided key.- Parameters:
key
- The key to match- Returns:
- The matching
AutoModTriggerType
orUNKNOWN
-