Discord icon

Discord

Interact with Discord API - users, messages, webhooks, guilds, interactions, and more

Actions193

Auto Moderation → Modify Rule

AI-generated

Summary

Updates an existing Discord auto moderation rule in a guild. Supply the guild and rule IDs, then set any rule fields you want to change; the operation sends the update using the configured bot token.

Inputs

  • Authentication — Select Bot Token (the default) for server moderation.
  • Guild (required) — Guild snowflake ID containing the rule.
  • Rule (required) — Auto moderation rule snowflake ID to modify.
  • Name — Rule name to set.
  • Event Type — Set the event type to Message Send or Member Update. Unchanged omits this field from the request.
  • Trigger Metadata — Raw JSON trigger_metadata object; leave empty to omit it. Its shape depends on the rule's trigger type.
  • Actions Collection — Add guided actions: Block Message (optional custom message), Send Alert Message (channel ID required), Timeout (duration in seconds), or Block Member Interaction.
  • Actions — Raw JSON array of Discord actions; leave empty to omit. The UI description says guided actions are appended after raw actions.
  • Enabled — Set whether the rule is enabled.
  • Exempt Role IDs — Comma-separated role IDs to exempt.
  • Exempt Channel IDs — Comma-separated channel IDs to exempt.
  • Audit Log Reason — Reason recorded in the guild audit log; Discord limits the header to 512 characters.
  • Request Options — Optional batching, TLS certificate validation, proxy, and request timeout settings.

Output shape

A single Discord auto moderation rule record.

The operation modifies the rule through Discord's API; fields not supplied are omitted from the update. Exact response fields are not specified in the provided source view.

Links

Discussion