Your own rules: when something happens in your server, do something about it.
Setting one up
- Switch the module on.
- Give the rule a name — it is for you, and nobody in your server ever sees it.
- Pick what starts it, and narrow it if you want to: which channels and roles, a pattern a message has to match, which kinds of moderation action, which ticket types, which level.
- Add blocks. Each one is either a check or a thing to do, and you join them with arrows.
- Save it.
That is the whole of it: there is nothing to publish and nothing to post. A rule starts applying the next time the thing it is about happens.
Starting from a template
Start from a template fills the editor with a ready-made rule: welcoming new members, a role on join, thanking boosters, a word filter, a links-only channel, auto-reactions, a keyword reply, a role on reaction, logging roles given, timing out on AutoMod, announcing an event as it starts, and a role at a level.
Nothing is saved until you press save, and you can change anything first. What only your server can know — which channel, which role — is left empty and marked, and the rule cannot be saved until each is chosen. The word filter and keyword reply come with example words in their pattern; replace them with yours.
Rules are drawn as blocks joined by arrows
Each block says what follows it. A check says two things: what follows when it holds, and what follows when it does not.
When a moderator acts
|
Only if action is banned
yes / \ no
Post in #mod-log Send them a DM
That second arrow is the point of the whole editor. One rule now says "log a ban, and direct-message everything else" — which used to need two rules, and two copies of a rule drift apart the first time you edit one of them.
You can join blocks two ways, and they do exactly the same thing:
- Drag from the dot at the bottom of a block onto the block that should follow it.
- Choose it from the "then go to" dropdown inside the block. This works with a keyboard, works on a phone, and says in words what the arrows say in lines.
A branch with no arrow leaving it ends the rule there, which is the commonest thing to want. Two branches may come back together.
A rule that loops — an arrow leading back to a block it has already run — is refused when you save it, because it would never finish. A block with nothing leading to it is allowed and never runs; the editor says so rather than refusing, because a rule you are halfway through drawing is not a mistake. The same goes for a rule with no actions in it yet.
Placeholders
Each trigger carries a few facts, and a message can use any of them by name:
{member_name} was {action} for {reason}. The editor lists what the trigger you picked
offers, and pressing one puts it where your cursor is.
A placeholder the trigger does not carry renders as nothing rather than printing itself —
banned for {reason} in front of your members is a worse outcome than a short sentence.
Text that arrives in a fact is text. A reason somebody typed cannot smuggle in another placeholder, and nothing assembled from a placeholder can ping anybody. If you want a rule to ping a role, choose that role on the step; it is the only thing that mentions anyone.
The triggers that start from a message also offer {message} — what it said — and, if you set
a pattern, {match} and {group_1} to {group_9}. Those can only be used where the bot sends
them straight back to Discord: a post, a reply, a direct message, a thread's name. They cannot
go in a moderation reason, which is kept in your moderation history here, and a rule that
starts from something the dashboard sees — a ticket, a level, a moderator acting — has no
message to use at all.
Narrowing a trigger
A trigger acts on every one of its events unless you narrow it. Pick several kinds and any of them will do — "warnings and kicks, but not bans" is one rule rather than two, which matters because two copies of a rule drift apart the first time you edit one of them.
Picking none means every one. That is the default, and it is what you get by leaving the narrowing alone.
Moderation kinds and ticket types are picked from a list. A level is typed, and takes one value for now.
Only in some channels, for some roles, or matching a pattern
The triggers that start in Discord can be narrowed further, before any block runs:
- Channels. Pick none for anywhere. A channel includes the threads in it.
- Roles they have, and roles they must not have. "Anybody but staff" is one rule: leave the first empty and put your staff roles in the second. Roles the bot cannot see — somebody who has already left, or the author of a deleted message — never match a role filter, so those triggers do not offer one.
- A pattern the message has to match, for messages and AutoMod. It is a regular
expression, so
free\s+(nitro|robux)catches "free nitro" and "free robux", and{group_1}is whichever word it was. Tick ignore upper and lower case rather than writing both.
Under the pattern there is a box to try it. What you type there stays in your browser — it is never saved or sent anywhere.
Patterns are run by the bot with RE2, which always finishes in time proportional to the
message however the pattern is written, so no pattern can slow your server's bot down. The
price is a handful of features it leaves out — looking ahead or behind ((?=…)), back
references (\1) and a few rarer forms — and the editor refuses those as you type. A pattern
the bot still cannot run is set aside, and the rule says so on this page rather than quietly
doing nothing.
A check can match a pattern too, against any fact — and its groups become placeholders for the blocks after it.
What can start a rule
Messages
- A message is sent, edited or deleted.
- AutoMod acts on a message. One hit is one run, however many things the AutoMod rule does.
Members
- Somebody joins, leaves, boosts, or changes their nickname.
- Somebody is given a role, or loses one.
Moderation
- A moderator acts — a warning, note, kick, ban, unban, softban or timeout.
- Somebody is timed out, banned or unbanned, whoever did it.
Reactions, voice, threads, invites and events
- A reaction is added or removed.
- Somebody joins, leaves or moves between voice channels.
- A thread is created.
- An invite is created or deleted.
- A scheduled event is created, starts or ends, or somebody marks themselves interested.
Tickets and levels
- A ticket is opened or closed.
- Somebody reaches a level.
Some of these need the bot to hold a permission before Discord will tell it they happened: View Audit Log for role and nickname changes, Manage Server for AutoMod, and Manage Channels for invites.
What a rule can do
Post
- Post a message in a channel you choose.
- Send the person it happened to a direct message.
- Post one of your embeds, as a fresh copy each time.
- Run one of your commands, posting what it would have answered.
On the message that started it — only for rules that start from a message or a reaction
- Reply to it, pinging nobody.
- React with an emoji, either one like 👍 or one of your server's by name.
- Pin it, delete it, or start a thread on it.
On the member
- Give or take a role. Only roles below the bot's own highest role, and never one Discord manages, such as the booster role.
- Change their nickname, or clear it.
- Move them to another voice channel, while they are in voice.
- Give or take XP. Only members who have signed in here once have XP to change.
- Open a ticket of a type you choose for them, as though they had pressed its button.
Moderation
- Time them out, for up to 28 days. Kick or ban them.
Channels
- Lock a channel so nobody can post, and unlock it again. Roles with their own permission to post still can, which is how your staff keep talking.
- Set slow mode, or turn it off with 0.
- Rename a channel. Discord allows two renames of a channel every ten minutes; more wait their turn.
Web requests
- Fetch, send, replace, update or delete at an https address you choose: GET, POST, PUT, PATCH or DELETE. See below.
Timing
- Wait up to 15 minutes before the next block. A wait is held by the bot, so if it restarts while a rule is waiting, that rule stops there.
An action that needs a message or a member is greyed out for a trigger that has neither — a reply makes no sense when somebody joins.
Automations never moderate your staff
Timing out, kicking and banning are refused for the server's owner, for anybody with Administrator, and for anybody whose highest role is at or above the bot's — even where Discord itself would allow it. Each also needs its own permission: Moderate Members, Kick Members or Ban Members. A server that never wants a rule to ban anybody can simply not grant Ban Members.
Each one is written to Discord's audit log as "Automation: the rule's name", followed by the reason you gave, and recorded in your moderation history as that automation's doing. A rule on a moderator acts does not run on what an automation did, so two rules can never keep answering each other.
A direct message silently does nothing if they have them closed, which many people do. That is Discord's decision and nothing reports it back.
Posting an embed sends a copy. It is not the same thing as pressing publish on the embeds page, which keeps one message in step with what you have written — a rule posts a new message every time it fires. Editing the embed changes what future posts say and leaves the ones already sent alone.
Running a command posts what it would answer, with {user} and {username} meaning the
person the event happened to. Its role restriction is not checked, because nobody typed
it — a rule is your server asking for the command directly. A command you have switched off
is not run at all.
Giving or taking a role is the one everybody asks for and is deliberately not here yet: a rule written in a web form that can change what a member is deserves to ship on purpose rather than as a side effect.
When something goes wrong
A rule that fails costs itself and nothing else. The event that started it — recording the ban, opening the ticket — is already done and cannot be undone by an automation, and the rest of your rules still run. A block that fails does not stop the blocks after it.
Each rule on this page shows how often it has run, how many runs had a block fail, and why the most recent one did — "the bot is missing a permission", "it tried to act on an administrator". Only counts and the reason come back from the bot, never what a run was about.
A rule can run at most 30 times a minute. Past that, runs are dropped until the minute is up, so a rule that sets itself off — or a busy channel — cannot flood your server. Nothing a bot does starts a rule.
Web requests
A web request step calls an address you choose and keeps the answer for the blocks after it. You give it:
- An address starting with
https://. - A credential (optional), one of the named tokens you saved at the bottom of this page. It is
sent as
Authorization: Bearer. You can type a{variable}instead of a name to choose it from an earlier answer. - Headers (optional, up to 10).
- A body (POST, PUT, PATCH and DELETE), sent as JSON unless you set a Content-Type header.
- Values to save (optional, up to 10): a variable name and a path into a JSON answer, like
data.items.0.id. A path that finds nothing saves an empty value.
The answer is available to every block after it: {http_status}, {http_body} (the first 4,000
characters) and each variable you saved, and a check can branch on any of them. An answer that is
not a success (2xx), a timeout of more than 10 seconds, or an address that is not allowed fails
the step, and the rule carries on to the next block, with the status and body still set so a
check can react to a 404.
Where a member's words may go. {message}, {match} and the groups can be used in the body
and after the ? in the address, where they are URL-encoded. They cannot be used in the host or
path, in a header, or in the credential, and a rule that does is refused when you save it. In the
body they go in exactly as they are, so a quote or line break in a message can break your JSON.
This sends part of a message to the address you chose, so only point it at a service you trust
with that text.
What is never allowed. Only https on the usual port, never an IP address, never Discord, never a local or internal name, never an address that resolves to a private network, and never this application. A redirect is followed up to 3 times and each stop is checked again. The answer is read up to 1 MB. A server can make 30 web requests a minute across all its rules. Vantage operators can also block addresses for every server.
What we keep. The token is stored encrypted and never shown again after you save it; it is
replaced or deleted from the same card. Vantage does not store what is sent or what comes back.
If the answer echoes your token, it is replaced with [redacted] before any block can see it.
What the bot reads, and what it keeps
To match a pattern, the bot reads each message in the channels you chose, in memory, at the moment it arrives. Nothing it reads is stored, logged or sent to this dashboard: the text goes only into what your rule posts in Discord, and is forgotten as soon as the rule has run. The one exception is a web request step you add, which sends the words you put in its body or query to the address you chose, and nowhere else.
Switching it off
Your rules stay exactly as written and stop running. Anything they already posted stays in its channel, because that is the channel's history rather than ours to take back.
