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
-
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()
SerializedDataObject
for this object.Methods inherited from class net.dv8tion.jda.api.entities.automod.build.AbstractTriggerConfig
getType
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.entities.automod.build.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:SerializableData
SerializedDataObject
for this object.- Specified by:
toData
in interfaceSerializableData
- Overrides:
toData
in classAbstractTriggerConfig<MentionSpamTriggerConfig>
- Returns:
DataObject
-