Automations - Actions Reference
Actions are what a rule does. A rule can have several; they run from top to bottom in the order shown in the editor (use the arrows to reorder them). If one fails, for example because the bot lacks a permission, it is skipped and the next one still runs. The rule's run is then recorded as partly successful, and a rule with Log to mod log on names the failed actions and why in its mod log entry.
| Action | Dashboard label | Triggers |
|---|---|---|
delete_message | Delete the message | on_message, on_reaction_add, every message spam trigger |
delete_spam_messages | Delete contributing spam messages | every message spam trigger |
send_message | Send a message | on_message, on_member_join, on_member_leave, on_member_update, on_voice_state, on_scheduled_event, on_invite_create, on_channel_create, on_role_update, on_custom_status_update, on_join_spam, on_thread_create_spam, on_antiraid_level, every message spam trigger, every on_mod_* trigger, every on_thread_* trigger, both reaction triggers |
reply_message | Reply to the message | on_message, on_reaction_add |
pin_message | Pin the message | on_message |
add_reaction | Add a reaction | on_message |
remove_reactions | Remove all reactions | on_message, on_reaction_add |
create_thread | Create a thread | on_message |
publish_message | Publish to announcement channel | on_message |
assign_role | Add roles to the member | on_message, on_member_join, on_member_update, on_voice_state, on_custom_status_update, on_mod_warn, on_mod_timeout, on_mod_untimeout, on_mod_note, every message spam trigger, every on_thread_* trigger, both reaction triggers |
assign_role_join_spam_members | Add roles to matched join-raid members | on_join_spam |
remove_role | Remove roles from the member | on_message, on_member_join, on_member_update, on_voice_state, on_custom_status_update, on_mod_warn, on_mod_timeout, on_mod_untimeout, on_mod_note, every message spam trigger, every on_thread_* trigger, both reaction triggers |
remove_role_join_spam_members | Remove roles from matched join-raid members | on_join_spam |
set_nickname | Set the member nickname | on_message, on_member_join, on_member_update, on_custom_status_update |
timeout_member | Timeout the member | on_message, on_member_join, on_member_update, on_voice_state, on_custom_status_update, on_mod_warn, on_mod_note, every message spam trigger, every on_thread_* trigger |
timeout_join_spam_members | Timeout matched join-raid members | on_join_spam |
kick_member | Kick the member | on_message, on_member_join, on_member_update, on_voice_state, on_custom_status_update, on_mod_warn, on_mod_note, every message spam trigger, every on_thread_* trigger |
kick_join_spam_members | Kick matched join-raid members | on_join_spam |
ban_member | Ban the member | on_message, on_member_join, on_member_leave, on_member_update, on_custom_status_update, on_mod_warn, on_mod_timeout, on_mod_kick, on_mod_note, every message spam trigger, every on_thread_* trigger |
ban_join_spam_members | Ban matched join-raid members | on_join_spam |
assign_role_thread_spam_creators | Add roles to matched thread-spam creators | on_thread_create_spam |
remove_role_thread_spam_creators | Remove roles from matched thread-spam creators | on_thread_create_spam |
timeout_thread_spam_creators | Timeout matched thread-spam creators | on_thread_create_spam |
kick_thread_spam_creators | Kick matched thread-spam creators | on_thread_create_spam |
ban_thread_spam_creators | Ban matched thread-spam creators | on_thread_create_spam |
warn_member | Warn the member | on_message, on_member_join, on_member_update, on_custom_status_update, every message spam trigger, every on_thread_* trigger |
dm_user | Send the member a direct message | on_message, on_member_join, on_member_update, on_voice_state, on_custom_status_update, on_mod_warn, on_mod_timeout, on_mod_kick, on_mod_untimeout, on_mod_note, every message spam trigger, every on_thread_* trigger, both reaction triggers |
set_slowmode | Set channel slowmode | on_message, on_channel_create, on_spam_detected, on_message_spam, on_antiraid_level |
lock_channel | Lock the channel | on_message, on_thread_create, on_channel_create, on_spam_detected, on_message_spam, on_join_spam, on_antiraid_level |
unlock_channel | Unlock the channel | on_message, on_thread_create, on_channel_create, on_antiraid_level |
change_perms | Change channel or role permissions | on_message, on_scheduled_event, on_channel_create, on_antiraid_level, every message spam trigger |
archive_thread | Archive the thread | on_message, on_reaction_add, on_thread_create, on_thread_update, on_thread_unarchive, every message spam trigger |
archive_thread_spam_threads | Archive matched spam threads | on_thread_create_spam |
lock_thread_spam_threads | Lock matched spam threads | on_thread_create_spam |
delete_thread_spam_threads | Delete matched spam threads | on_thread_create_spam |
log_to_channel | Post a log message | on_message, on_member_join, on_member_leave, on_member_update, on_voice_state, on_scheduled_event, on_invite_create, on_channel_create, on_role_update, on_custom_status_update, on_join_spam, on_thread_create_spam, on_antiraid_level, every message spam trigger, every on_mod_* trigger, every on_thread_* trigger, both reaction triggers |
send_webhook | Send a webhook message | on_message, on_member_join, on_member_leave, on_member_update, on_voice_state, on_scheduled_event, on_invite_create, on_channel_create, on_role_update, on_custom_status_update, on_join_spam, on_thread_create_spam, on_antiraid_level, every message spam trigger, every on_mod_* trigger, every on_thread_* trigger, both reaction triggers |
wait | Wait before the next action | on_message, on_member_join, on_member_leave, on_member_update, on_voice_state, on_scheduled_event, on_invite_create, on_channel_create, on_role_update, on_custom_status_update, on_join_spam, on_thread_create_spam, on_antiraid_level, every message spam trigger, every on_mod_* trigger, every on_thread_* trigger, both reaction triggers |
add_infraction | Add infraction points | on_message, on_member_join, on_custom_status_update, on_mod_warn, on_mod_timeout, on_mod_kick, on_mod_ban, on_mod_note, every message spam trigger, every on_thread_* trigger |
update_activity_score | Adjust the member's activity rule score | on_message, on_member_join, on_member_leave, on_member_update, on_voice_state, on_custom_status_update, on_mod_warn, on_mod_timeout, on_mod_kick, on_mod_ban, on_mod_untimeout, on_mod_note, on_message_spam, on_mention_spam, on_link_spam, on_attachment_spam, on_emoji_spam, on_line_spam, on_character_spam, on_sticker_spam, every on_thread_* trigger, both reaction triggers |
update_activity_rule_decay | Update an activity rule's decay configuration | on_scheduled_event, on_antiraid_level |
set_antiraid_level | Set anti-raid level | on_message, on_member_join, on_scheduled_event, on_join_spam, on_thread_create_spam, every message spam trigger |
change_template_pack | Switch the active template pack | on_scheduled_event |
Action settings
Messages
- Send a message: posts a saved message template (Message Template) in a Channel you pick, or in the channel where the rule was triggered. Delete after (seconds) removes it later, and Send via Webhook posts it through a webhook with an optional Webhook Name, Avatar (an Icon in place of the module's and a Ring colour: the server's accent or the color of the message's first container; Server default uses the Automations defaults in Settings > Webhook Avatars; anything but the webhook's own avatar needs the dashboard's
public_urlto behttps://) and Webhook Avatar URL (replaces the whole avatar). - Reply to the message: replies with a Reply Template.
- Send the member a direct message: DMs a DM Template; Delete after (seconds) removes the DM later. Members with closed DMs are skipped.
- Post a log message: posts a Log Template to a Log Channel (or the channel where the rule was triggered), optionally through a webhook like Send a message.
- Templates are the ones you save in the Message Builder. Create template above a template field (Edit template once one is picked) opens the Message Builder and brings you back to the rule, unsaved changes included, with the new template picked. If a rule's template is deleted, the action is skipped and the bot raises a bot alert. The variables these messages can use are on the Variables page.
Moderation
- Warn the member, Timeout the member (Duration (seconds), default 60), Kick the member and Ban the member take a Reason and record a case in the Moderation module, with the bot as the moderator. These cases add no infraction points, and the member gets the usual moderation DM. The case starts with no proof: what the rule matched goes to the rule's Log to mod log entry (see Settings), not the case.
- Ban the member also takes a Ban duration: leave it at 0 for a permanent ban, or set one for a timed ban, which the Moderation module lifts when it runs out, as it does for
/banwith a duration. Delete message history (days, 0 to 7) deletes that many days of the member's messages (default 0). A ban also reaches someone who is no longer a member, so it works on When a member leaves and on moderation triggers about a user who already left (for example, ban whoever was kicked). A timeout or a kick needs a member. - Every action that records a case has two case options. Hide the case records it as a hidden case: it still counts, but
/casesand the dashboard case list leave it out unless asked (see Cases and Evidence). Turning off Post the case to the case log keeps it out of the case log channel; it is on by default. - Without the Moderation module loaded, these actions still act, but record no case, and a ban is always permanent.
- Add infraction points adds Points (default 5) to the member's infraction total, only while the Moderation infraction system is on. When the new total crosses a threshold, the threshold's action runs right away, as it would after
/warn(not while the Moderation module is off for the server). - Delete contributing spam messages deletes every message behind the match (in the rule's window, or the detectors' for Any spam detected), not only the latest one, apart from those the rule already acted on. The deletes are reported in one Message Spam or Spam Detected mod log entry with an archive, and while the rule's follow-up window is open, further spam from the member is deleted the same way (see Spam triggers).
- The
*_join_spam_membersactions (Add roles to, Remove roles from, Timeout, Kick and Ban matched join-raid members) act on every member who joined in the burst that tripped Join raid detected. - The
*_thread_spam_creatorsactions (Add roles to, Remove roles from, Timeout, Kick and Ban matched thread-spam creators) act on every member who created a thread in the burst that tripped Thread creation spam detected, and Archive, Lock and Delete matched spam threads on those threads. Deleting removes the threads and their messages for good. - The join raid and thread spam timeout, kick and ban actions take the same settings as Timeout, Kick and Ban the member (the ban its Ban duration and Delete message history too, and each its two case options), and record one case per member.
- Roles given or removed by the join raid and thread spam actions follow the same rule as Add roles to the member: the role must be below the bot's and your own highest role.
- Set anti-raid level sets the Moderation anti-raid level (Anti-Raid Level).
Members and roles
- Add roles to the member / Remove roles from the member take Roles to Add / Roles to Remove. The roles must be below the bot's highest role.
- Set the member nickname takes a Nickname, which can use variables such as
{user.name}.
Channels and threads
-
Set channel slowmode sets Slowmode Delay (seconds) (0 to 21600) on every channel in Channels. A category stands for every channel in it, and threads, voice, stage and forum channels take a slowmode too. Leave Channels empty to use the channel where the rule fired; on a spam trigger that includes every channel the matched spam was sent in.
-
Change channel or role permissions has two modes:
- Channel overrides sets permission overrides on a Channel (a category too; leave it empty for the channel where the rule fired, and a thread's overrides are its channel's). They apply to a Role (@everyone included), a Member, or the Triggering member, the one who set the rule off (the message author, the member who joined ...). Each permission is Allow, Deny or Inherit, which clears that override; an override left with nothing set is removed.
- Role permissions grants or removes a role's server-wide permissions, for example taking Send Messages from @everyone during a raid and giving it back when the anti-raid level drops. The role cannot be an integration's role and must be below the bot's highest role, and the bot can only grant permissions it has itself.
Saving is checked against what you could do by hand. Taking permissions away (Deny, or removing a role permission) is open to anyone who can edit the rule. Handing one out (Allow, or Inherit on a channel, since clearing a deny can open a channel up) needs Manage Roles and the permission itself: server-wide in Role permissions mode, in that channel for Channel overrides. Administrators (and the server owner) are not limited, and only they can:
- allow Administrator or a moderation or manage permission (Ban Members, Kick Members, Timeout Members, Manage Server, Manage Roles, Manage Channels, Manage Messages, Manage Nicknames, Manage Webhooks, Mention @everyone);
- grant @everyone a permission in Role permissions mode;
- hand out a permission in the channel where the rule fired, which can be any channel (pick a Channel instead).
In Role permissions mode the role must also be below your own highest role. A rule's permission change stays editable by anyone who can edit the rule only while it stays exactly as saved: another target, channel or set of permissions, or new conditions or a new trigger for the rule, is checked again.
-
Lock the channel and Unlock the channel deny or restore Send Messages for @everyone in the channel where the rule was triggered. Triggers without a channel (such as When anti-raid level changes) have nothing to lock; use the anti-raid level's Lock Channels for that.
-
Create a thread starts a thread on the message, named by Thread Name (variables allowed). Archive after inactivity (an hour, a day, three days or a week; default a day) and Thread slowmode (seconds) apply to the new thread. Private thread makes a private thread in the channel instead, with the message's author added to it; it works in text channels only (not announcement channels), and the bot needs Create Private Threads.
-
Archive the thread archives the thread a thread trigger names, or on message, reaction and spam triggers, the thread the message was posted in (a message outside a thread has nothing to archive). Also lock it locks the thread too, so only members who can manage threads can reopen it.
-
Pin the message, Add a reaction (Emoji), Remove all reactions and Publish to announcement channel act on the triggering message.
Other modules and utilities
- Adjust the member's activity rule score changes a member's score in an Analytics Activity Rule (Add points, Subtract points, Set points to or Reset to zero). Update an activity rule's decay configuration changes a rule's decay (Decay Amount, Decay Every).
- Switch the active template pack activates a Template Pack, for example a holiday pack on a schedule.
- Send a webhook message posts a small JSON body (
guild_id, plususerwith the username when the event has a member, or a user who is not one, such as the target of/forceban) to an external Webhook URL, for example to notify another service. Only public addresses are allowed, and any 2xx answer counts as success. - Wait before the next action pauses the rule for up to 30 seconds.