Enum AutoModResponse.Type
- All Implemented Interfaces:
Serializable
,Comparable<AutoModResponse.Type>
- Enclosing interface:
AutoModResponse
The type of response.
-
Enum Constant Summary
Enum ConstantDescriptionBlocks the member from interacting with the guild until they update the offending content.Blocks the message from being sent.Sends an alert message to the specified channel.Times out the user for the specified duration.Placeholder for unknown types. -
Method Summary
Modifier and TypeMethodDescriptionstatic AutoModResponse.Type
fromKey
(int key) TheAutoModResponse.Type
represented by the provided key.int
getKey()
The raw value used by Discord to represent this type.TheAutoModTriggerTypes
that this response supports.boolean
Whether this response supports the provided trigger type.static AutoModResponse.Type
Returns the enum constant of this type with the specified name.static AutoModResponse.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BLOCK_MESSAGE
Blocks the message from being sent. -
SEND_ALERT_MESSAGE
Sends an alert message to the specified channel. -
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
Blocks the member from interacting with the guild until they update the offending content.- Incubating:
- This has not been officially released yet
-
UNKNOWN
Placeholder for unknown types.
-
-
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 type.- Returns:
- The raw value
-
getSupportedTypes
TheAutoModTriggerTypes
that this response supports.- Returns:
- The supported trigger types
-
isSupportedTrigger
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 isnull
-
fromKey
TheAutoModResponse.Type
represented by the provided key.- Parameters:
key
- The raw key- Returns:
- The
AutoModResponse.Type
orUNKNOWN
-