Class PresetKeywordTriggerConfig
java.lang.Object
net.dv8tion.jda.api.entities.automod.build.AbstractTriggerConfig<PresetKeywordTriggerConfig>
net.dv8tion.jda.api.entities.automod.build.AbstractKeywordTriggerConfig<PresetKeywordTriggerConfig>
net.dv8tion.jda.api.entities.automod.build.PresetKeywordTriggerConfig
- All Implemented Interfaces:
TriggerConfig
,SerializableData
public class PresetKeywordTriggerConfig
extends AbstractKeywordTriggerConfig<PresetKeywordTriggerConfig>
Configuration for a
KEYWORD_PRESET
trigger.-
Method Summary
Modifier and TypeMethodDescriptionDisable the provided keyword preset lists.disablePresets
(AutoModRule.KeywordPreset... presets) Disable the provided keyword preset lists.enablePresets
(Collection<AutoModRule.KeywordPreset> presets) Enable the provided keyword preset lists.enablePresets
(AutoModRule.KeywordPreset... presets) Enable the provided keyword preset lists.toData()
SerializedDataObject
for this object.Methods inherited from class net.dv8tion.jda.api.entities.automod.build.AbstractKeywordTriggerConfig
addAllowList, addAllowList, setAllowList
Methods inherited from class net.dv8tion.jda.api.entities.automod.build.AbstractTriggerConfig
getType
-
Method Details
-
enablePresets
@Nonnull public PresetKeywordTriggerConfig enablePresets(@Nonnull AutoModRule.KeywordPreset... presets) Enable the provided keyword preset lists.- Parameters:
presets
- The keyword presets to enable- Returns:
- The current config for chaining convenience
- Throws:
IllegalArgumentException
- If any of the provided presets is null orUNKNOWN
-
enablePresets
@Nonnull public PresetKeywordTriggerConfig enablePresets(@Nonnull Collection<AutoModRule.KeywordPreset> presets) Enable the provided keyword preset lists.- Parameters:
presets
- The keyword presets to enable- Returns:
- The current config for chaining convenience
- Throws:
IllegalArgumentException
- If any of the provided presets is null orUNKNOWN
-
disablePresets
@Nonnull public PresetKeywordTriggerConfig disablePresets(@Nonnull AutoModRule.KeywordPreset... presets) Disable the provided keyword preset lists.- Parameters:
presets
- The keyword presets to disable- Returns:
- The current config for chaining convenience
- Throws:
IllegalArgumentException
- If any of the provided presets is null
-
disablePresets
@Nonnull public PresetKeywordTriggerConfig disablePresets(@Nonnull Collection<AutoModRule.KeywordPreset> presets) Disable the provided keyword preset lists.- Parameters:
presets
- The keyword presets to disable- Returns:
- The current config for chaining convenience
- Throws:
IllegalArgumentException
- If any of the provided presets is null
-
toData
Description copied from interface:SerializableData
SerializedDataObject
for this object.- Specified by:
toData
in interfaceSerializableData
- Overrides:
toData
in classAbstractKeywordTriggerConfig<PresetKeywordTriggerConfig>
- Returns:
DataObject
-