AutoModRule
- class AutoModRule
An Auto Moderation rule configured for a guild.
Properties
Property
Type
Description
actionsActions taken when this rule is triggered.
createdAtWhen this auto moderation rule was created, decoded from the rule snowflake.
enabledIndicates whether this rule is currently enabled.
eventType1
The type of event that triggers this rule.
exemptChannelsstring[]
Channel IDs exempt from this rule.
exemptRolesstring[]
Role IDs exempt from this rule.
guildIdGuild ID this rule belongs to.
idAuto moderation rule ID.
nameRule name.
triggerMetadataMetadata specific to the trigger type.
triggerTypeThe type of trigger used by this rule.
Methods
- async AutoModRule.delete(reason: string) Promise<void>
Delete this rule.
- Parameters:
reason: Reason for deletion, shown in audit log.
-
async AutoModRule.edit(options:
AutoModRuleEditOptions) Promise<AutoModRule> Edit rule properties.
- Parameters:
options: Rule properties to update.
- Returns:
The updated rule.