Class MentionSpamTriggerConfig
java.lang.Object
net.dv8tion.jda.api.entities.automod.build.AbstractTriggerConfig<MentionSpamTriggerConfig>
net.dv8tion.jda.api.entities.automod.build.MentionSpamTriggerConfig
- All Implemented Interfaces:
TriggerConfig, SerializableData
public class MentionSpamTriggerConfig
extends AbstractTriggerConfig<MentionSpamTriggerConfig>
implements TriggerConfig
Configuration for
MENTION_SPAM trigger.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetMentionLimit(int mentionLimit) Configure the maximum number of unique mentions allowed in a message.setMentionRaidProtectionEnabled(boolean enabled) Whether to enable mention raid protection.toData()SerializedDataObjectfor this object.Methods inherited from class AbstractTriggerConfig
getTypeMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TriggerConfig
getType
-
Constructor Details
-
MentionSpamTriggerConfig
public MentionSpamTriggerConfig(int mentionLimit)
-
-
Method Details
-
setMentionLimit
Configure the maximum number of unique mentions allowed in a message.- Parameters:
mentionLimit- The maximum number of unique mentions allowed in a message (1-50)- Returns:
- The current config for chaining convenience
- Throws:
IllegalArgumentException- If the provided mention limit is not between 1 and 50
-
setMentionRaidProtectionEnabled
Whether to enable mention raid protection.- Parameters:
enabled- True, if mention raid protection should be enabled- Returns:
- The current config for chaining convenience
-
toData
Description copied from interface:SerializableDataSerializedDataObjectfor this object.- Specified by:
toDatain interfaceSerializableData- Overrides:
toDatain classAbstractTriggerConfig<MentionSpamTriggerConfig>- Returns:
DataObject
-