Conditions, data, and math

Branch on values, keep persistent state, and calculate counters in a visual graph.

If / Else

Select a field or insert a variable, choose an operator, and enter a comparison value. The Yes output runs when it matches; No runs otherwise.

OperatorExample use
EqualsCompare a command option with an exact choice
ContainsCheck whether message text includes a phrase
ExistsCheck whether an input has a value
Greater than / Less thanCompare a number with a threshold
MatchesMatch a simple regular expression

For example, compare {option:topic} with rules, connect Yes to a rules response, and No to a general help response. Prefer numeric fields for numeric comparisons. Keep regular expressions simple; unsupported patterns do not match.

Data

A Data node has two modes: Single value and Records. Both use the same account-wide storage and key allowance. In Single value mode, choose a key, a data type, and an action:

ActionEffect
LoadReads the saved value into the current flow
SaveWrites the supplied value, or the current loaded value when left blank
DeleteClears the saved value

Read a loaded value with {store:key}. A number with no saved value loads as 0, a boolean as false, and text as an empty string. Loading first makes the value available to subsequent conditions and calculations.

Include a member ID in a key to keep separate records, such as points_{user.id}. In later text, use {store:points_{user.id}}. Values are separated by bot and runtime server scope; runs in the same server can access the same saved keys. A command's registration scope does not itself create a separate database.

Shared records

Add a Data node and choose Data mode → Records for named configurations or other groups of fields shared by multiple commands. You can also select Data · Records from Add action. Records use the same bot and runtime scope as single values. A collection such as configs holds records identified by an ID such as welcome_main.

  • Save writes a type and up to 20 text fields together. Saving an existing ID replaces the whole record, so include every field you want to keep.
  • Load reads one record by ID. Check {store:config.found} before using {store:config.field.channel}. Missing records return found=false.
  • List returns a page of records and IDs. Choose a result limit (1–50), an optional search term and field, and text or numeric sorting. Search can come from a command option such as {option:query} or a modal value. Leave it empty to return all records matching the optional type filter. Use a limit of 1 for a single search result, or up to 25 when building menu choices.
  • Delete removes one record and frees its storage.

Collection and field names use lowercase letters, numbers and underscores, starting with a letter (up to 32 characters). IDs use letters, numbers, underscores and hyphens (up to 100 characters). Field values support variables and up to 10,000 characters each, with a 64 KB limit on the complete serialized record. Each record uses one key and its serialized UTF-8 size from your account's data storage allowance, shared across all bots. Restrict configuration-writing commands to administrators when appropriate.

To build this manually, choose Save, collection configs, ID welcome_main, type welcome, and add a field named channel with value {option:channel}. Set the output variable to config. In another command, add Data → Records → Load with the same collection and ID, then use {store:config.field.channel} after checking {store:config.found}. Existing Records actions open in this Data mode automatically.

Use the {x} selector beside any record text input to insert a command option, setting, or upstream variable at the cursor. Collection names, field names, search and sort fields, result limits, and output names can also use variables. Resolved names and limits must follow the same rules as literal values; duplicate resolved field names are rejected before saving. Operation and sorting choices remain fixed selections.

For example, /create-config can save channel and message fields in the configs collection. /list-configs can filter that collection by type and load those same fields. Both commands must use the same collection name, field names and ID convention.

Build multiple commands with AI

In the AI builder, choose Command, then enable Build commands that work together (2–5). Describe all the commands and how they should share data. The preview shows each command and the shared collection definitions. The AI validates their shared-data rules while generating and exporting them. Save all saves every command together; command limits or a stale preview prevent the whole save.

Choose the number of commands before generating. Multiple commands prompts may consume multiple requests. Repair attempts are included, and cancelling still consumes requests. The builder checks that the result contains exactly the requested number of commands.

Once saved, each command is a normal, independent command. You can rename, edit, or delete it individually. Shared collection and field names still determine which records commands use, but there is no saved group enforcing those definitions. To update a command with AI, choose Modify existing and select that command.

Query outputs

With an output variable of results, List provides:

OutputMeaning
{store:results.records}JSON list of records, each containing id, type, and values
{store:results.ids}JSON list of IDs for loops or other nodes
{store:results.count}Number of records on this page
{store:results.total}Total matching records
{store:results.page} / {store:results.pages}Current page and number of pages; empty results use page 1 of 1

Search matches a literal substring, so % and _ are not wildcards. Text matching ignores ASCII letter case. Sorting uses record ID as a tie-breaker. Page queries run against current data, so changed or deleted records can change the results.

The advanced After ID cursor remains available for ID-order lists. It replaces page-number pagination, cannot be combined with field sorting, and does not provide total/page counts. Use {store:results.next} for the next cursor.

Pagination

Pagination is separate from data queries and menus. Add a Pagination node, set its page variable (for example page), and connect Page contents to the nodes that render one reply. That branch runs initially for page 1 and again when the member clicks Previous or Next. Navigation updates the same message.

For a paginated record list:

  1. Set Pagination’s Page variable to page and Number of pages to {store:results.pages}.
  2. Connect Page contents → Data → Records → List. Set Data’s Page to {store:page} and output variable to results.
  3. Connect a Send Message → Reply node that displays the results or an embed.
  4. Optionally attach a Select Menu → List variable using {store:results.records}. The menu’s Select branch can load {store:selected} and show details.

Search and sorting remain optional settings on Data. A pagination branch can also render plain text or other list sources without using records or a menu. Number of pages is evaluated after the page branch, allowing it to reference the query output.

The reply and embed nodes in Page contents control the page's text, images, colors, fields, and footer. Under Navigation controls, customize Previous and Next labels, button color, and whether navigation appears above or below your other controls. You can hide the page indicator or change its label. Labels accept variables and the pagination placeholders {page} and {pages}; their resolved text must be 1–80 characters.

Render one reply per page and leave one component row for navigation. Put actions that change state in button or selection branches: Page contents runs on every page change. Nested Pagination nodes are not supported.

Each session retains the opening member’s inputs and is usable by that member for 15 minutes. Restarting the bot or expiring the session requires running the command again. Separate invocations keep separate page state.

Math

Choose the numeric value to change, an operation, and the other operand. Operations are add, subtract, multiply, divide, and modulo (remainder). Operands can use variables.

Math changes the value in the current flow. Follow it with Data → Save to retain the result for the next invocation. Avoid division by zero; the current result for dividing or taking a remainder by zero is 0.

Example: a personal counter

  1. Create a count command.
  2. Data → Load the number key count_{user.id}.
  3. Math → Add 1 to that loaded value.
  4. Data → Save the same key, leaving the value blank to save the calculation.
  5. Send Message with Your count is {store:count_{user.id}}..

Test the command twice and then with another member. Use load/save counters for simple workflows; simultaneous runs can read the same previous value, so this sequence is not an atomic transaction.

Temporary outputs

Nodes can also produce temporary values, such as an AI reply or an image attachment reference. These are available to later nodes through the output shown in the editor. Temporary values do not become persistent until explicitly saved, and image references should never be saved for later reuse.