class AutoModerationRule
extends
Baseexport class AutoModerationRule extends BaseRepresents an auto moderation rule.
actions : AutoModerationAction[]
The actions of this auto moderation rule.
creatorId : Snowflake
The user that created this auto moderation rule.
enabled : boolean
Whether this auto moderation rule is enabled.
eventType : AutoModerationRuleEventType
The event type of this auto moderation rule.
exemptChannels : Collection<Snowflake, GuildBasedChannel>
The channels exempt by this auto moderation rule.
exemptRoles : Collection<Snowflake, Role>
The roles exempt by this auto moderation rule.
guild : Guild
The guild this auto moderation rule is for.
id : Snowflake
The id of this auto moderation rule.
name : string
The name of this auto moderation rule.
triggerMetadata : AutoModerationTriggerMetadata
The trigger metadata of the rule.
triggerType : AutoModerationRuleTriggerType
The trigger type of this auto moderation rule.
edit(options: AutoModerationRuleEditOptions) : Promise<AutoModerationRule>
Edits this auto moderation rule.
setActions(actions: readonly AutoModerationActionOptions[]reason?: string) : Promise<AutoModerationRule>
Sets the actions for this auto moderation rule.
setAllowList() : Promise<AutoModerationRule>
Sets the allow list for this auto moderation rule.
setEnabled() : Promise<AutoModerationRule>
Sets whether this auto moderation rule should be enabled.
setEventType(eventType: AutoModerationRuleEventTypereason?: string) : Promise<AutoModerationRule>
Sets the event type for this auto moderation rule.
setExemptChannels(exemptChannels: ReadonlyCollection<Snowflake, GuildBasedChannel> | readonly GuildChannelResolvable[]reason?: string) : Promise<AutoModerationRule>
Sets the exempt channels for this auto moderation rule.
setExemptRoles(exemptRoles: ReadonlyCollection<Snowflake, Role> | readonly RoleResolvable[]reason?: string) : Promise<AutoModerationRule>
Sets the exempt roles for this auto moderation rule.
setKeywordFilter() : Promise<AutoModerationRule>
Sets the keyword filter for this auto moderation rule.
setMentionRaidProtectionEnabled() : Promise<AutoModerationRule>
Sets whether to enable mention raid protection for this auto moderation rule.
setMentionTotalLimit() : Promise<AutoModerationRule>
Sets the mention total limit for this auto moderation rule.
setName() : Promise<AutoModerationRule>
Sets the name for this auto moderation rule.
setPresets(presets: readonly AutoModerationRuleKeywordPresetType[]reason?: string) : Promise<AutoModerationRule>
Sets the presets for this auto moderation rule.
setRegexPatterns() : Promise<AutoModerationRule>
Sets the regular expression patterns for this auto moderation rule.