Action Mapping
Each AutoMod action mapping connects a Discord AutoMod rule to a specific Thrella bot action. When Discord fires the rule, Thrella executes the mapped action and creates a case for tracking.
Mapping Fields
Every action mapping has the following fields:
| Field | Description |
|---|---|
| ID | Unique identifier for this mapping. |
| Rule ID | The Discord AutoMod rule ID this mapping responds to. |
| Rule name | Display name of the Discord AutoMod rule (for reference in the dashboard). |
| Action | The bot action to execute: WARN, MUTE, KICK, or BAN. |
| Reason | Reason text included in the case and mod log embed. |
| Duration | Timeout duration in seconds. Only applies to the MUTE action. |
| Enabled | Toggle to enable or disable this mapping without deleting it. |
Action Types
WARN
- Sends a DM to the user informing them of the warning.
- Creates a case with action type WARN.
- Logs the event to the mod log channel.
Warnings are informational -- no Discord punishment is applied. They serve as a formal record that the user was notified about a rule violation.
MUTE
- Applies a Discord timeout to the user.
- Sends a DM to the user with the timeout details and duration.
- Creates a case with action type MUTE, including the duration and expiry time.
- Logs the event to the mod log channel.
If no duration is configured on the mapping, a default timeout of 1 hour is applied.
Important: Discord AutoMod rules can themselves apply a timeout as one of their native actions. If Discord has already applied a timeout before Thrella processes the event, Thrella will skip the Discord timeout API call but will still create the case and log the event. This prevents errors from trying to apply a second timeout and ensures the action is still tracked in your case history.
KICK
- Sends a DM to the user informing them of the kick and the reason.
- Kicks the user from the server.
- Creates a case with action type KICK.
- Logs the event to the mod log channel.
BAN
- Sends a DM to the user informing them of the ban and the reason.
- Bans the user from the server.
- Creates a case with action type BAN.
- Logs the event to the mod log channel.
Consistent Case Tracking
Regardless of which action type is configured, every AutoMod-triggered action creates a full case. This means AutoMod-initiated actions appear alongside manually issued moderation actions in:
- The
/caseslash command results. - The dashboard Cases page.
- The user's case history.
The moderator field on AutoMod-generated cases references the bot itself, making it clear the action was automated.
Duration Field
The duration field is specified in seconds and only has an effect when the action is set to MUTE. For WARN, KICK, and BAN actions, the duration field is ignored.
Common duration values:
| Duration | Seconds |
|---|---|
| 5 minutes | 300 |
| 1 hour | 3600 |
| 12 hours | 43200 |
| 24 hours | 86400 |
| 7 days | 604800 |
| 28 days | 2419200 |
Validation Requirements
When configuring action mappings, the following validation rules apply:
Rule ID
- Must be a valid Discord Snowflake ID (17-19 digits)
- The dashboard validates this format automatically
Action Type
- Must be one of: WARN, MUTE, KICK, or BAN
- Enforced by the dropdown selector
Reason
- Minimum length: 1 character
- Maximum length: 512 characters
- Valid characters: ASCII printable characters only (letters, numbers, punctuation, spaces)
- Special characters and non-ASCII text are rejected
Duration (MUTE only)
- Minimum: 60 seconds (1 minute)
- Maximum: 2,419,200 seconds (28 days - Discord's maximum timeout)
- Required: Duration must be specified for MUTE actions
- Duration is ignored for WARN, KICK, and BAN actions
The dashboard will validate these requirements when you save an action mapping and display an error if any field is invalid.