Automations
Build rules that watch for an event, check your conditions and act, without writing any code.
Plus and up
How a rule works
Every automation is one rule with three parts. A trigger is the event that wakes it up. Conditions decide whether this particular event is one you care about. Actions are what happens when it is.
A rule with no conditions runs on every occurrence of its trigger, which is sometimes exactly what you want and is the fastest way to make a rule too noisy. Conditions are how you narrow it down. The exception is timeout, kick, ban and remove role: those need at least one real condition, and the dashboard refuses to save a rule without one.
- Open Automations in the dashboard and click New Rule.
- Give the rule a name. The name is only for you, and it is what the rule list shows.
- Pick the trigger under When.
- Add conditions, if this rule should only fire some of the time.
- Add at least one action. A rule cannot be saved without a name and one action.
- Set a cooldown and a priority if the rule needs them, then save.
Saved rules appear in a list with their trigger, cooldown and priority. Each one can be switched between Enabled and Disabled, edited or deleted, so you can take a rule out of service without losing it.
Triggers
There are 19 triggers, in two groups. Discord triggers cover what happens in your server; streaming triggers come from the platform you have connected.
- Discord: 13 triggers
- A member sends, edits or deletes a message; clicks a button; adds or removes a reaction; joins or leaves the server; gains or loses a role; joins or leaves a voice channel; or creates a thread.
- Streaming: 6 triggers
- A new subscription, an incoming raid, a new follow, bits cheered, a stream going live and a stream going offline.
YouTube Super Chats and Super Stickers trigger the same Cheer rules as Twitch bits, so one rule covers both. Bits conditions and {cheer.bits} use the bits each one counts as, and {cheer.message} is the Super Chat comment (empty for a Super Sticker).
- YouTube Super Chats count as bits
- A setting on the Automations page, one per server. Per US dollar (the default, 100 bits per US dollar) counts each Super Chat by its price; other currencies are converted with an approximate exchange rate. A flat amount counts every Super Chat and Super Sticker the same, whatever it cost. Either way the number is a whole number from 1 to 100,000, and each Super Chat or Super Sticker counts as at least 1 bit and at most 1,000,000 bits. A currency Unum has no exchange rate for counts as 1 bit in per US dollar mode.
A rule has exactly one trigger. If you want the same actions on two different events, build two rules. You can copy the conditions and actions across by hand.
Role changes made by automations don't start other role automations, so two rules can never pass a role back and forth. Roles given by people, role menus, auto roles and the rest of Unum trigger role rules as usual.
Conditions
Conditions sit in a group, and a group is either ALL of (AND), where every condition must hold, or ANY of (OR), where one is enough. Groups can be nested inside groups, so a rule can express something like "a subscriber, in one of these two channels, whose message mentions a keyword".
There are 23 conditions. They fall into a few families:
- Who triggered it
- Has or lacks a specific role, is a moderator, is a subscriber, is a VIP, or has an account or server age of at least so many days.
- What they said
- The message contains or starts with some text, matches a regular expression, or has at least or at most a given word count.
- Where it happened
- The channel is or is not a particular channel, the voice channel is a particular one, or the platform is a particular platform.
- Stream specifics
- Raid viewers at or above a number, bits at or above a number, subscription tier at or above a level, and whether a subscription was a gift.
- Exact matches
- The reaction emoji is a given emoji, the role is a given role, or the clicked button has a given ID.
Actions
A rule can have as many actions as it needs, and they run in the order you list them. There are 11 to choose from:
- Send a message to a channel, or send a DM to the member who triggered the rule.
- Delete the message that triggered the rule.
- Add a role to the member, or remove one.
- Time the member out for a number of seconds, kick them, or ban them, each with an optional reason.
- Safety rules for the punishing actions (timeout, kick, ban and remove role): the rule needs at least one real condition, and a condition with a missing value cannot be saved. They only run on Discord events, never touch staff (Administrator, Manage Server or the Bot Manager role), the server owner or bots, and only act when Unum is able to act on the member. Delete message also skips staff.
- Add credits to the member, or remove credits.
- Wait a number of seconds before the next action, up to 60.
Send message asks which channel to post in. Pick it from the list of your server's text channels.
Placeholders
Message and DM text, and the reason of a timeout, kick or ban, accept placeholders in single braces, which are replaced with real values when the rule runs. Under the message text the builder lists the ones the rule's trigger provides:
- Every rule
- {guild.name}, {guild.id} and {timestamp}.
- The member
- {user.name}, {user.mention} and {user.id}, on every trigger except Stream goes live and Stream goes offline.
- Message triggers
- {message.content} and {message.id}. An edit also has {message.oldContent} and {message.newContent}.
- Message, reaction and button triggers
- {channel.name} and {channel.id}.
- Reactions and buttons
- {reaction.emoji} and {button.customId}.
- Voice
- {voice.channelName} and {voice.channelId}.
- Role changes
- {role.name} and {role.id}.
- Threads
- {thread.name}, {thread.id} and {thread.parentChannelId}.
- Raids
- {raid.viewerCount} and {raid.fromUser}.
- Cheers
- {cheer.bits} and {cheer.message}.
- Subscriptions
- {subscription.tier}, {subscription.isGift} and {subscription.gifterName}.
- Stream goes live
- {stream.title}, {stream.game}, {stream.url} and {stream.channelName}.
Use {user.mention} rather than {user.name} when you want the message to ping the member. Only that placeholder pings, and only the member the rule is about. A placeholder that its trigger cannot fill has nothing to put in its place, so keep each rule to the placeholders its own trigger provides.
Cooldowns and priority
- Cooldown
- A number of seconds before the rule may fire again. Leave it empty for no cooldown. This is the setting that stops a chat trigger from becoming a flood. A rule that gives Credits needs a cooldown of at least 60 seconds.
- Cooldown scope
- Per user means each member has their own cooldown. Global means the whole server shares one, so the rule fires once per cooldown period no matter who triggered it.
- Priority
- The order rules run in, lowest first. It matters when two rules could act on the same event: put the rule that deletes a message ahead of the one that replies to it.
What each plan includes
The free plan covers 3 custom commands: your own commands with a fixed response. That handles most of what small servers ask an automation to do.
Plus adds the Rule Builder described above, with the AND/OR condition logic, and unlimited custom commands.
Ultimate adds credit actions: a rule can give or take credits from the member who triggered it, between 1 and 1,000,000 at a time. Rules belong to one server, so in a Server Group that shares Credits each server pays its own rule’s credits. Everything else in Plus works the same on Ultimate.
Every new server gets 14 days of Ultimate when Unum joins, so you can build a few rules and see whether they earn their place before deciding.