Preview deployment

class AutoModerationRule

extends

Base
export class AutoModerationRule extends Base

Represents an auto moderation rule.

The actions of this auto moderation rule.

readonly
client : Client<true>

The client that instantiated this

Inherited from: Base

creatorId : Snowflake

The user that created this auto moderation rule.

enabled : boolean

Whether this auto moderation rule is enabled.

The event type of this auto moderation rule.

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.

The id of this auto moderation rule.

name : string

The name of this auto moderation rule.

The trigger metadata of the rule.

The trigger type of this auto moderation rule.

delete(
reason?: string
) : Promise<void>

Deletes this auto moderation rule.

Edits this auto moderation rule.

setActions(
actions: readonly AutoModerationActionOptions[]
reason?: string
) : Promise<AutoModerationRule>

Sets the actions for this auto moderation rule.

setAllowList(
allowList: readonly string[]
reason?: string
) : Promise<AutoModerationRule>

Sets the allow list for this auto moderation rule.

setEnabled(
enabled?: boolean
reason?: string
) : Promise<AutoModerationRule>

Sets whether this auto moderation rule should be enabled.

setEventType() : Promise<AutoModerationRule>

Sets the event type for this auto moderation rule.

setExemptChannels() : 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(
keywordFilter: readonly string[]
reason?: string
) : Promise<AutoModerationRule>

Sets the keyword filter for this auto moderation rule.

setMentionRaidProtectionEnabled(
mentionRaidProtectionEnabled: boolean
reason?: string
) : Promise<AutoModerationRule>

Sets whether to enable mention raid protection for this auto moderation rule.

setMentionTotalLimit(
mentionTotalLimit: number
reason?: string
) : Promise<AutoModerationRule>

Sets the mention total limit for this auto moderation rule.

setName(
name: string
reason?: string
) : Promise<AutoModerationRule>

Sets the name for this auto moderation rule.

setPresets(
reason?: string
) : Promise<AutoModerationRule>

Sets the presets for this auto moderation rule.

setRegexPatterns(
regexPatterns: readonly string[]
reason?: string
) : Promise<AutoModerationRule>

Sets the regular expression patterns for this auto moderation rule.

toJSON(
...props: Record<string, boolean | string>[]
) : unknown

Inherited from: Base

valueOf() : string

Inherited from: Base