# Get AutoMod Rule

> Get details of an auto moderation rule.

- ID: `get_automod_rule`
- Type: Block
- Category: [Auto Moderation](https://inventor.bot/docs/reference/blocks/auto-moderation.md)

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `server_id` | yes | Server the rule belongs to. |  |
| `rule_id` | yes | ID of the auto moderation rule. |  |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `rule_id` | ID of the auto moderation rule. |  |
| `server_id` | ID of the server. |  |
| `name` | Name of the rule. |  |
| `creator_id` | User who created the rule. |  |
| `event_type` | Event type (Message Send or Member Update). |  |
| `trigger_type` | Trigger type (Keyword, Spam, Keyword Preset, Mention Spam, Member Profile). |  |
| `enabled` | Whether the rule is enabled. |  |

**Example**

```go
automodRule := get_automod_rule(Args{server_id: trigger.server_id, rule_id: "..."})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Rule ID: " + automodRule.rule_id,
})
```