Sign In

autoModerationActionExecution

This event is fired when an automod is fired under a message

v1.2.0+

Register the event

Enable autoModerationActionExecution in events and include the required gateway intents in your ForgeClient options in index.js:

const { ForgeClient } = require("@tryforge/forgescript")

const client = new ForgeClient({
  events: [
    "autoModerationActionExecution"
  ],
  intents: [
    "Guilds",
    "AutoModerationExecution"
  ]
})

Handle the event

Listen and react when autoModerationActionExecution is triggered using an inline command or an external handler file:

client.commands.add({
  type: "autoModerationActionExecution",
  code: `$log[autoModerationActionExecution event was triggered!]`
})

Required Intents

Listening to this event requires:
Guilds AutoModerationExecution

Was this page helpful?