Nested counters
Feed the result of one counter into another to build numbers no single counter can produce.
Most counter options are boxes you type into, and almost all of them take a counter instead. The inner counter runs first, and its result becomes the value of that option. That is a nested counter, and it is how you get numbers no single counter offers: members minus bots, or a value pulled from your own API and then formatted.
A nested counter is not a second chip in the template. It lives inside its parent, and the whole thing still shows as one chip.
Which options accept a nested counter
Any option that takes free text or a number. Each counter's own page says which of its options qualify.
Options that are a fixed choice (Operation type, Filter by status, Display) take one of their listed values only. The digit boxes under Override default digits in Format settings take text and emoji, not counters.
Adding one
Open the chip's edit panel and find the option you want to fill.
Click the option's box. The dropdown lists the same counters as Add counter, under the literal values the option already offers.
Pick a counter. The option now shows a row with the counter's name instead of a typed value.
Its gear opens the nested counter's own options, and its X takes it back out.
Where the gear has a tooltip, it says what the nested counter has to return there, for example a role ID on Filter by role. Nothing is checked while you edit, so a nested counter that returns the wrong kind of value only fails when the bot runs the template, see Troubleshooting.

The breadcrumb
Pressing the gear opens the nested counter, and a breadcrumb shows where you are. Each entry is the counter's generated chip name, not the counter's type: a Math counter with one nested counter reads Add and 1 more.
Click an earlier entry to jump straight back to it.
The back arrow goes up one level.
The X closes the panel entirely.

Formatting comes from the outermost counter
A nested counter hands its raw value to its parent. Compact notation, the locale and custom digits are applied once, to the final value of the outermost counter in the chip. That is why the Format settings block keeps editing the outermost counter even while you are drilled several levels down: a nested counter has no formatting of its own.
So to get 1.2M instead of 1234567, set compact notation on the counter at the top of the stack, not on the one that produces the number. See Formatting counters.
Examples
Goal: show how many members are not staff.
There is no "members without a role" filter, so subtract one Members count from another.
Press Add counter and pick Math.
Set Operation type to Subtraction.
In Number list, add a counter and pick Members. Leave every filter empty, so it counts the whole server.
Add a second counter to the list and pick Members again. Press its gear, set Filter by role to @Staff, and go back with the breadcrumb.
Type
non-staffafter the chip.
The channel shows the number of members without the role, followed by non-staff.
Order matters. Subtraction and division fold the list from first to last with no starting value, so the first entry is the one everything else is taken away from. Addition and multiplication do not care about order.
Give each Members chip a display label such as All and Staff, or both rows will show almost the same generated name.

Goal: turn a status word from your own API into something readable.
Your endpoint returns {"status":"ok"} and you want the channel to say 🟢 Online.
Press Add counter and pick Replace.
Click Input text and pick HTTP from the list.
Press the gear on the HTTP row. Set URL (GET) to your endpoint and Data path to
status. Set Lifetime (in seconds) to60so the bot does not hit your API on every run. Go back with the breadcrumb.Press Add replacement. Put
okin Search for and🟢 Onlinein Replace with.
The channel reads 🟢 Online.

Goal: make a value from your own API obey your formatting.
The HTTP counter always returns text, even when the text happens to be digits. Text is passed through untouched, so compact notation, the locale and your custom digits never apply to it.
Wrap it in Number to turn it back into a number:
Press Add counter and pick Number.
Click the Number box and pick HTTP from the list.
Press the gear, configure the URL and data path, then go back.
Open Format settings on the Number chip and set Use compact notation to Yes.
The channel now shows the value in compact notation.
The same trick works for any counter that produces text, and it is the reason the Number counter exists.

Limits
Nothing caps nesting depth or the number of counters directly, but a very deep tree eventually trips the explorer's step limit and fails with An unknown error occurred.
A chip and everything nested inside it must finish within 60 seconds. The usual culprit is a Game counter pointing at a server that does not answer, or a long chain of nested requests. HTTP requests give up after 5 seconds on their own.
Last updated