Skip to main content

CreateAutoModerationRuleOptions

@discordeno/bot


Documentation / @discordeno/bot / CreateAutoModerationRuleOptions

Interface: CreateAutoModerationRuleOptions

Defined in: packages/types/dist/types/discordeno.d.ts:921

Properties

actions

actions: object[]

Defined in: packages/types/dist/types/discordeno.d.ts:942

The actions that will trigger for this rule

metadata?

optional metadata: object

additional metadata needed during execution for this specific action type

metadata.channelId?

optional metadata.channelId: BigString

The id of channel to which user content should be logged. Only in SendAlertMessage

metadata.durationSeconds?

optional metadata.durationSeconds: number

Timeout duration in seconds. Max is 2419200(4 weeks). Only supported for TriggerType.Keyword

type

type: AutoModerationActionType

The type of action to take when a rule is triggered


enabled?

optional enabled: boolean

Defined in: packages/types/dist/types/discordeno.d.ts:954

Whether the rule should be enabled, true by default.


eventType

eventType: AutoModerationEventTypes

Defined in: packages/types/dist/types/discordeno.d.ts:925

The type of event to trigger the rule on.


exemptChannels?

optional exemptChannels: BigString[]

Defined in: packages/types/dist/types/discordeno.d.ts:958

The channel ids that should not be effected by the rule.


exemptRoles?

optional exemptRoles: BigString[]

Defined in: packages/types/dist/types/discordeno.d.ts:956

The role ids that should not be effected by the rule


name

name: string

Defined in: packages/types/dist/types/discordeno.d.ts:923

The name of the rule.


triggerMetadata

triggerMetadata: object

Defined in: packages/types/dist/types/discordeno.d.ts:929

The metadata to use for the trigger.

allowList?

optional allowList: string[]

The substrings which will exempt from triggering the preset trigger type. Only present when TriggerType.KeywordPreset

keywordFilter?

optional keywordFilter: string[]

The keywords needed to match. Only present when TriggerType.Keyword

mentionTotalLimit?

optional mentionTotalLimit: number

Total number of mentions (role & user) allowed per message (Maximum of 50). Only present when TriggerType.MentionSpam

presets?

optional presets: DiscordAutoModerationRuleTriggerMetadataPresets[]

The pre-defined lists of words to match from. Only present when TriggerType.KeywordPreset

regexPatterns?

optional regexPatterns: string[]

Regular expression patterns which will be matched against content. Only present when TriggerType.Keyword


triggerType

triggerType: AutoModerationTriggerTypes

Defined in: packages/types/dist/types/discordeno.d.ts:927

The type of trigger to use for the rule.