Class AutoModerationRule

Represents an auto moderation rule.

Hierarchy

  • Base
    • AutoModerationRule

Constructors

Properties

_cachedGuild?: any

The actions that will execute when this rule is triggered.

creator?: User

The creator of this rule.

creatorID: string

The ID of the creator of this rule.

enabled: boolean

If this rule is enabled.

eventType: MESSAGE_SEND

The event type of this rule.

exemptChannels: string[]

The channels that are exempt from this rule.

exemptRoles: string[]

The roles that are exempt from this rule.

guildID: string

The id of the guild this rule is in.

id: string
name: string

The name of this rule

triggerMetadata: TriggerMetadata

The metadata of this rule's trigger.

This rule's trigger type.

Accessors

  • get createdAt(): Date
  • Returns Date

  • get guild(): Guild
  • The guild this rule is in. This will throw an error if the guild is not cached.

    Returns Guild

Methods

  • Delete this auto moderation rule.

    Parameters

    • Optional reason: string

      The reason for deleting this rule.

    Returns Promise<void>

  • Edit this auto moderation rule.

    Parameters

    • options: Partial<Pick<CreateAutoModerationRuleOptions, "name" | "eventType" | "triggerMetadata" | "actions" | "enabled" | "exemptRoles" | "exemptChannels" | "reason">>

      The options for editing the rule.

    Returns Promise<AutoModerationRule>

  • Returns string

  • Parameters

    Returns void

  • Parameters

    • Optional timestamp: number | Date

    Returns string

  • Parameters

    • id: string

    Returns Date

  • Parameters

    • id: string

    Returns number

Generated using TypeDoc