docsTriggersEventsonAutomodAction

onAutomodAction

Fires when an auto moderation rule takes action, such as blocking a message. Requires the AUTO_MODERATION_EXECUTION intent. Action fields are read with Zoption{key}.

When it fires

An automod rule blocks or flags content

Available Context Variables

VariableDescription
author_idUser ID who triggered the rule
usernameEmpty
channel_idChannel ID if the action targets one, otherwise empty
guild_idGuild ID
messageEmpty. Zoption keys: ruleID, action (e.g. BlockMessage), triggerType (e.g. Keyword), messageID
trigger_message_idMessage ID if the action targets a message