Building With Blocks
Build automations by stacking steps under a trigger. Every block, how to pick members and amounts, conditions, and placeholders for messages.
The editor opens full screen. The left panel lists your inputs and steps, the middle shows the automation, and the right panel shows the selected step's settings or the results of a test.
Use the Blocks and Code switch at the top to move between the block view and the Luau it produces.
Triggers
Every automation needs at least one trigger, and every other step goes inside one. An automation can have several triggers, for example a weekly schedule and a command that does the same thing on demand.
| Trigger | When it runs |
|---|---|
| On a schedule | At the times you set. See Schedules. |
| When someone uses a custom command | When a member uses the command. See Custom Commands. |
Steps
Points
| Step | What it does |
|---|---|
| Give points | Adds points to one member |
| Take points | Takes points from one member. The run fails if they don't have enough. |
| Set balance | Sets one member's balance to an exact amount |
| Transfer points | Moves points from one member to another |
| Give points to members | Adds the same amount to every member that matches |
| Take points from members | Takes the same amount from every member that matches. Balances stop at 0 instead of failing. |
| Set members' balance | Sets every member that matches to the same balance |
Bank
| Step | What it does |
|---|---|
| Pay from the bank | Moves points from the server bank to a member. The run fails if the bank doesn't have enough. |
| Add to the bank | Adds points to the server bank |
| Take from the bank | Removes points from the server bank |
| Tax members | Takes a percentage of every matching member's balance into the bank |
Roles and Items
| Step | What it does |
|---|---|
| Give a role | Gives a member a role |
| Remove a role | Removes a role from a member |
| Give an item | Adds a shop item to a member's inventory, up to 100 at a time. It doesn't cost them anything. |
| Take an item | Removes a shop item from a member's inventory. The run fails if they don't have enough. |
Automations can't give or remove roles that have moderation or admin permissions (like Administrator, Ban Members or Manage Roles), roles managed by an integration, or @everyone. Points also needs a role above the ones it hands out, the same as for any Discord bot.
Messages
| Step | What it does |
|---|---|
| Send a message | Posts in a channel of your server |
| Reply | Answers the person who ran the command. Only available inside a custom command. You can make the reply visible only to them. |
| Post to the log | Sends to your log channels that include the Automations log type. See What Are Logs?. |
A run can send up to 5 messages. Messages can mention members but never @everyone or @here.
Logic
| Step | What it does |
|---|---|
| If | Runs the steps under Then when a condition is true, and the steps under Otherwise when it isn't |
| For each member | Repeats the steps inside for each matching member, up to 1,000 |
| Stop | Ends the run there. Anything done before it is kept. |
Choosing a Member
Steps that act on one member ask who. The choices depend on where the step is.
| Choice | Means |
|---|---|
| Person who ran the command | The member who used the custom command |
| A command option | A member picked in one of the command's options |
| An input | A member each server chooses when installing |
| Current member | The member being handled inside For each member |
| A specific member | A fixed member, by ID |
Choosing a Group of Members
Bulk steps and For each member act on every member that matches. Leave the filter empty for everyone, or narrow it down:
- has a role
- has at least a certain balance
- has at most a certain balance
- owns a shop item
You can combine them. "Has @Regulars and at least 1,000 points" matches only members who meet both.
Amounts
Any amount can be a fixed number, a number from a command option, or a number from an input. Inputs are the better choice for anything a server might want to change, like the size of a stipend.
Conditions
The If step checks one of these:
| Condition | Example |
|---|---|
| A member's balance | The person who ran the command has at least 100 points |
| A member's roles | The current member has, or doesn't have, @Regulars |
| A random chance | 5% of the time |
Placeholders in Messages
Message text can include placeholders in curly brackets. The editor lists the ones you can use at each step.
| Placeholder | Becomes |
|---|---|
{user} | A mention of the person who ran the command |
{member} | A mention of the current member inside For each member |
{count} | How many members the last bulk step changed |
{total} | How many points the last bulk step moved |
{input-name} | The value of an input, by its name |
{option-name} | The value of a command option, by its name |
For example: Collected {total} points from {count} members.
Inputs
Inputs are the settings a server fills in when it installs an automation. Use them for anything server-specific, like channels, roles and amounts, so the automation works in any server and can be shared.
Add an Input from the left panel and give it a name, a label, a type, and whether it's required. You can also set a default, and limits where they apply. After that, any step that asks for a channel, role, member or amount offers the input as a choice.
| Input type | Holds |
|---|---|
| Channel | A channel in the server |
| Role | A role in the server |
| Member | A member of the server |
| Number | Any number |
| Whole number | A number without decimals |
| Text | A short piece of text |
| On/off | A switch that's on or off |
| Choice | One option from a list you write |
Custom Code
If you change something in the code view that blocks can't show, it appears in the block view as a Custom code block. It runs exactly as written, and you can keep editing the rest of the automation with blocks around it.
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| ⌘S or Ctrl+S | Save |
| ⌘Enter or Ctrl+Enter | Test |
| ↑ and ↓ | Select the previous or next step |
| ⌥↑ and ⌥↓, or Alt+↑ and Alt+↓ | Move the selected step up or down |
| Backspace or Delete | Delete the selected step |
| Esc | Clear the selection |
You can also drag steps to reorder them, or move them into and out of triggers, If and For each member.
What Are Automations?
Automations let you add your own behaviour to Points, from slash commands that work the way you design them to jobs that run on a schedule.
Custom Commands
Add real slash commands to your server that run your own steps. Names, options, permissions, cooldowns, replies and how commands reach Discord.