Reference
Look up the text variables, every trigger, condition, and action and its parameters, and how each feature works.
Variables
Placeholders you can put in a reason, DM, nickname, or message. They fill in when the rule fires. Times are UTC.
| variable | example | meaning |
|---|---|---|
| {channel} | <#333333333333333333> | Links the channel the rule fired in (same as channel.mention). |
| {channel.createdat} | 2019-05-06 | When the channel was created (UTC date). |
| {channel.id} | 333333333333333333 | The channel's numeric id. |
| {channel.mention} | <#333333333333333333> | Links the channel the rule fired in (<#id>). |
| {channel.name} | general | The channel's name. |
| {classification} | kick | How the member left: voluntary, kick, or ban (member-leave rules only). |
| {date} | 2026-07-01 | The fire date, yyyy-MM-dd (UTC). |
| {datetime} | 2026-07-01 14:30 | The fire date and time (UTC). |
| {datetime12} | 2026-07-01 2:30 PM | The fire date and 12-hour time (UTC). |
| {everyone} | @everyone | The literal @everyone, neutralized so it never mass-pings. |
| {here} | @here | The literal @here, neutralized so it never mass-pings. |
| {roles} | <@&444444444444444444> <@&666666666666666666> | The roles the departed member held, as mentions (member-leave rules only). |
| {rule} | No Crypto | The name of the rule that fired. |
| {server} | Aegis HQ | The server's name (same as server.name). |
| {server.createdat} | 2019-05-05 | When the server was created (UTC date). |
| {server.icon} | https://cdn.discordapp.com/icons/222/def.png | URL of the server icon. |
| {server.id} | 222222222222222222 | The server's numeric id. |
| {server.membercount} | 1234 | The server's member count. |
| {server.name} | Aegis HQ | The server's name. |
| {server.ownerid} | 999999999999999999 | The server owner's numeric id. |
| {time} | 14:30 | The fire time, HH:mm (UTC). |
| {time12} | 2:30 PM | The fire time, 12-hour (UTC). |
| {user} | <@111111111111111111> | Links the acted-on member (same as user.mention). |
| {user.avatar} | https://cdn.discordapp.com/avatars/111/abc.png | URL of the member's avatar. |
| {user.createdat} | 2021-03-04 | When the member's account was created (UTC date). |
| {user.discriminator} | 0001 | The member's legacy #discriminator (empty for new-style names). |
| {user.id} | 111111111111111111 | The member's numeric id. |
| {user.joinedat} | 2024-09-12 | When the member joined this server (UTC date). |
| {user.mention} | <@111111111111111111> | Links/pings the acted-on member (<@id>). |
| {user.name} | Spammy | The member's display name. |
| {user.nick} | Spammy | The member's server nickname (empty if none). |
| {user.username} | spammy | The member's Discord username. |
| {@name} | <@111111111111111111> | Pings a member by name. |
| {&role} | <@&444444444444444444> | Pings a role by name. |
| {#channel} | <#555555555555555555> | Links a channel by name. |
Timestamps
Add a :STYLE suffix to a date variable to show the time as a live timestamp: each person sees it in their own local time, and the relative style updates on its own. The plain variable is unchanged. Works on: {channel.createdat}, {date}, {datetime}, {datetime12}, {server.createdat}, {time}, {time12}, {user.createdat}, {user.joinedat}.
| you write | shows | style |
|---|---|---|
| {datetime:t} | 16:20 | Short time |
| {datetime:T} | 16:20:30 | Long time |
| {datetime:d} | 20/04/2021 | Short date |
| {datetime:D} | 20 April 2021 | Long date |
| {datetime:f} | 20 April 2021 16:20 | Short date and time |
| {datetime:F} | Tuesday, 20 April 2021 16:20 | Long date and time |
| {datetime:R} | 2 months ago | Relative, updates on its own |
Triggers
When a rule fires. A rule fires when any of its triggers match (or all, per the section toggle).
channel-message-rate
Fires when a channel receives more than a set number of messages within a window (raid).
e.g. 20 messages in 10 seconds (a raid)
| parameter | type | label |
|---|---|---|
| count | Number | count |
| seconds | Number | seconds |
cross-channel-spam
Fires when one member posts across more than a set number of distinct channels within a window (crypto-scam spray).
e.g. posts across 3+ channels within 15 seconds
| parameter | type | label |
|---|---|---|
| channels | Number | channels |
| seconds | Number | seconds |
member-leave
Fires when a member leaves the server, whether they left on their own, were kicked, or were banned.
e.g. someone leaves, is kicked, or is banned
No parameters.
post-in-channel
Fires when a message is posted in any of the picked channels.
e.g. any post in #announcements
| parameter | type | label |
|---|---|---|
| channels | EntityMultiSelect | channels |
regex
Fires when a message matches a safe regular expression (needs Message Content).
e.g. matches (?i)free\s*nitro
| parameter | type | label |
|---|---|---|
| pattern | Text | regex pattern |
| ignoreCase | Bool | ignore case |
user-message-rate
Fires when one member sends more than a set number of messages within a window.
e.g. 5 messages in 3 seconds
| parameter | type | label |
|---|---|---|
| count | Number | count |
| seconds | Number | seconds |
violation-threshold
| parameter | type | label |
|---|---|---|
| name | Text | violation name |
| count | Number | count |
| minutes | Number | minutes |
| ignoreIfHigher | Bool | ignore if higher |
Conditions
Optional gates. All (or any) must pass for the rule to act.
account-age
Gates on how old the member's account is (above/below a threshold).
e.g. account younger than 7 days
| parameter | type | label |
|---|---|---|
| comparator | Select | comparator |
| value | Number | value |
| unit | Select | unit |
active-in-categories
Only applies in channels under the picked categories.
e.g. only under the Public category
| parameter | type | label |
|---|---|---|
| categories | EntityMultiSelect | categories |
active-in-channels
Only applies in the picked channels.
e.g. only in #general and #chat
| parameter | type | label |
|---|---|---|
| channels | EntityMultiSelect | channels |
active-in-threads
Applies inside threads.
e.g. also inside threads
No parameters.
edited-message
Only applies when a message was edited.
e.g. only when a message is edited
No parameters.
ignore-threads
Does not apply inside threads.
e.g. skip threads
No parameters.
ignored-categories
Does not apply under the picked categories.
e.g. skip the Staff category
| parameter | type | label |
|---|---|---|
| categories | EntityMultiSelect | categories |
ignored-channels
Does not apply in the picked channels.
e.g. skip #staff
| parameter | type | label |
|---|---|---|
| channels | EntityMultiSelect | channels |
ignored-roles
Exempts members who have the picked roles (any or all), for example staff.
e.g. exempt @Moderator and @Admin
| parameter | type | label |
|---|---|---|
| roles | EntityMultiSelect | roles |
| mode | Select | match |
member-duration
Gates on how long the member has been in the server.
e.g. joined less than 1 day ago
| parameter | type | label |
|---|---|---|
| comparator | Select | comparator |
| value | Number | value |
| unit | Select | unit |
new-message
Only applies to a newly posted message (not an edit).
e.g. only brand-new messages (not edits)
No parameters.
require-roles
Only applies when the member has the picked roles (any or all).
e.g. only members with @Unverified
| parameter | type | label |
|---|---|---|
| roles | EntityMultiSelect | roles |
| mode | Select | match |
Actions
What the rule does when it fires. All of a rule's actions run (continue-and-record-each).
add-role
Adds a role to the member, optionally for a set number of minutes (auto-removed after, a temp mute that survives a restart). Needs Manage Roles.
e.g. add @Muted for 60 minutes (auto-removed after)
| parameter | type | label |
|---|---|---|
| roles | EntityMultiSelect | role |
| reason | Text | reason |
| durationMinutes | Number | auto-remove after minutes (blank keeps it) |
add-violation
Records a named violation (feeds threshold escalation).
e.g. add violation 'spam' (feeds thresholds)
| parameter | type | label |
|---|---|---|
| name | Text | violation name |
ban
Bans the member, optionally deleting a chosen window of their recent messages (Discord's ban options, default none).
e.g. ban, reason 'crypto scam'
| parameter | type | label |
|---|---|---|
| reason | Text | reason |
| pruneWindow | Select | delete recent messages (blank keeps default) |
delete-message
Deletes the triggering message (or the whole burst from a cross-channel-spam trigger).
e.g. delete the offending message (or the whole burst)
No parameters.
dm
Direct-messages the member (no pings, blank refused).
e.g. DM: 'You were removed from {server} for spam, {user.mention}.'
| parameter | type | label |
|---|---|---|
| message | TextArea | DM message |
kick
Kicks the member.
e.g. kick the member
| parameter | type | label |
|---|---|---|
| reason | Text | reason |
note
Records a private note (with a reason).
e.g. note: 'watch this account'
| parameter | type | label |
|---|---|---|
| reason | Text | reason |
remove-role
Removes a role from the member (needs Manage Roles).
e.g. remove @Member
| parameter | type | label |
|---|---|---|
| roles | EntityMultiSelect | role |
| reason | Text | reason |
remove-timeout
Clears the member's timeout.
e.g. lift the member's timeout
| parameter | type | label |
|---|---|---|
| reason | Text | reason |
reset-violations
| parameter | type | label |
|---|---|---|
| name | Text | violation name |
send-message
Posts a message to a channel (the triggering one or a picked one), can ping named roles/users, optional delete-after (needs Mention All Roles).
e.g. post '{&Moderation} {user.mention} tripped {rule}' to #mod-log, delete after 300s
| parameter | type | label |
|---|---|---|
| message | TextArea | message |
| channel | EntityMultiSelect | channel (blank replies here) |
| selfDelete | Bool | Self-delete message |
| deleteAfter | Number | after (seconds) |
set-nickname
Renames the member, truncated to 32 chars, a blank value resets it (needs Manage Nicknames).
e.g. rename to '{user.username} [muted]' (blank resets)
| parameter | type | label |
|---|---|---|
| nickname | Text | nickname (blank resets) |
softban
Bans then immediately unbans, deleting the chosen window of the member's recent messages (default 1 hour) without keeping them banned. A spam cleanup.
e.g. softban, delete the last 6 hours of messages
| parameter | type | label |
|---|---|---|
| reason | Text | reason |
| pruneWindow | Select | delete recent messages (blank keeps default) |
timeout
Times the member out for a number of minutes.
e.g. timeout for 60 minutes
| parameter | type | label |
|---|---|---|
| reason | Text | reason |
| minutes | Number | minutes |
unban
Unbans the member.
e.g. unban the member
| parameter | type | label |
|---|---|---|
| reason | Text | reason |
warn
Records a warning (with a reason).
e.g. warn: 'no advertising'
| parameter | type | label |
|---|---|---|
| reason | Text | reason |