var trigger = automod_action_execution()
func main() {
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "Server ID: " + trigger.server_id,
})
}
AutoMod Action Executed
Triggers when an auto moderation rule action is executed (e.g. message blocked, alert sent, user timed out).
Outputs
ID of the server where the action was executed.
Example: 123456789012345678
The rule that was triggered.
Example: 123456789012345678
The action type (Block Message, Send Alert Message, Timeout).
Example: Block Message
The trigger type (Keyword, Spam, Keyword Preset, Mention Spam, Member Profile).
Example: Keyword
The user whose content triggered the rule.
Example: 123456789012345678
Channel where content was flagged.
Example: 123456789012345678
Message that triggered the rule (empty if blocked).
Example: 123456789012345678
ID of the alert message sent to the alert channel.
Example: 123456789012345678
The user's message content.
Example: bad word here
The keyword that matched.
Example: badword
The substring of content that matched.
Example: badword
Use this trigger in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.
Advanced Documentation
This documentation can be useful when using code mode. View as Markdown
automod_action_executionOutputs
| Field | InventScript name | Value |
|---|---|---|
| Server ID | server_id | e.g. "123456789012345678" |
| Rule ID | rule_id | e.g. "123456789012345678" |
| Action Type | action_type | e.g. "Block Message" |
| Rule Trigger Type | rule_trigger_type | e.g. "Keyword" |
| User ID | user_id | e.g. "123456789012345678" |
| Channel ID | channel_id | e.g. "123456789012345678" |
| Message ID | message_id | e.g. "123456789012345678" |
| Alert System Message ID | alert_system_message_id | e.g. "123456789012345678" |
| Content | content | e.g. "bad word here" |
| Matched Keyword | matched_keyword | e.g. "badword" |
| Matched Content | matched_content | e.g. "badword" |