Package discord4j.core.object.automod
Enum AutoModRuleAction.Type
- java.lang.Object
-
- java.lang.Enum<AutoModRuleAction.Type>
-
- discord4j.core.object.automod.AutoModRuleAction.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<AutoModRuleAction.Type>
- Enclosing class:
- AutoModRuleAction
public static enum AutoModRuleAction.Type extends Enum<AutoModRuleAction.Type>
Represents an Action Type of AutoMod Action.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLOCK_MESSAGE
Blocks the content of a message according to the ruleSEND_ALERT_MESSAGE
Logs user content to a specified channelTIMEOUT
Timeout user for a specified duration
Note: This action can only be setup forAutoModRule.TriggerType.KEYWORD
rules and the user need to be the permissionPermission.MODERATE_MEMBERS
for use the actionUNKNOWN
Unknown type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getValue()
Gets the underlying value as represented by Discord.static AutoModRuleAction.Type
of(int value)
Gets the type of message.static AutoModRuleAction.Type
valueOf(String name)
Returns the enum constant of this type with the specified name.static AutoModRuleAction.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final AutoModRuleAction.Type UNKNOWN
Unknown type.
-
BLOCK_MESSAGE
public static final AutoModRuleAction.Type BLOCK_MESSAGE
Blocks the content of a message according to the rule
-
SEND_ALERT_MESSAGE
public static final AutoModRuleAction.Type SEND_ALERT_MESSAGE
Logs user content to a specified channel
-
TIMEOUT
public static final AutoModRuleAction.Type TIMEOUT
Timeout user for a specified duration
Note: This action can only be setup forAutoModRule.TriggerType.KEYWORD
rules and the user need to be the permissionPermission.MODERATE_MEMBERS
for use the action
-
-
Method Detail
-
values
public static AutoModRuleAction.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AutoModRuleAction.Type c : AutoModRuleAction.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AutoModRuleAction.Type 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 nameNullPointerException
- if the argument is null
-
getValue
public int getValue()
Gets the underlying value as represented by Discord.- Returns:
- The underlying value as represented by Discord.
-
of
public static AutoModRuleAction.Type of(int value)
Gets the type of message. It is guaranteed that invokinggetValue()
from the returned enum will be equal (==
) to the suppliedvalue
.- Parameters:
value
- The underlying value as represented by Discord.- Returns:
- The type of message.
-
-