Interface TriggerConfig

All Superinterfaces:
SerializableData
All Known Implementing Classes:
AbstractKeywordTriggerConfig, AbstractTriggerConfig, AntiSpamTriggerConfig, CustomKeywordTriggerConfig, MentionSpamTriggerConfig, PresetKeywordTriggerConfig

public interface TriggerConfig extends SerializableData
Configuration for AutoModRule, which defines under what conditions the rule should be triggered.

Each rule is limited to a single trigger type. You can use the various factory methods on this interface to create a config.

Supported factories:

Example


 AutoModRuleData rule = AutoModRule.onMessage("Invite Links",
   TriggerConfig.keywordFilter("discord.gg/*") // trigger on all invite links
     .setAllowList("discord.gg/discord-api")   // except certain whitelisted ones
 );
 
See Also: