Blocks
Utility and computation blocks for dynamic tag content
Variables & Logic Global
Assign a value to a named variable. Reference it later with
{varname}. Variables can hold any string, number, or
the result of another block. Undefined variables resolve to an empty
string.
{=(<name>):<value>}
Examples
{=(prefix):!} The prefix here is `{prefix}`.
# The prefix here is `!`.
{assign(day):Monday} {if({day}==Wednesday):It's Wednesday my
dudes!|The day is {day}.}
# The day is Monday.
Evaluates an expression and returns one of two payloads separated by
Operators:
|. Operators:
==,
!=, >, <,
>=, <=
{if(<expression>):<true>|<false>}
Examples
{if({args}==63):You guessed it!|Too {if({args}<63):low|high},
try again.}
# if args is 63: You guessed it! # if args is 73: Too low, try
again.
Returns the true payload if any of the pipe-separated
expressions evaluate to true.
{any(<expr|expr|β¦>):<true>|<false>}
Examples
{any({args}==hi|{args}==hello):Hello {user}!|How rude.}
# if args is "hi": Hello sravan#0001!
Returns the true payload only if all of the pipe-separated
expressions evaluate to true.
{all(<expr|expr|β¦>):<true>|<false>}
Examples
{all({args}>=100|{args}<=1000):You picked {args}.|Number must be
100β1000.}
# if args is 282: You picked 282.
Has a 50% chance to return the payload, and 50% chance to return
nothing.
{50:<message>}
Examples
{50:You won!}
# 50% chance: You won! # 50% chance: (nothing)
Stops processing the tag at this point. Text before
{break} is still returned. Useful inside conditionals
to cut off output early.
{break}
Examples
{if({args}==):No args given.{break}} Hello, {args}!
# if no args: No args given. # if args="world": Hello, world!
Silently stops all tag execution. Unlike
{break},
nothing is output at all β not even text that appeared before the
block.
{stop}
Math & Numbers Global
Evaluates a mathematical expression. Supports
+
- * / ^
% and functions: sin, cos,
tan, sqrt, abs,
round, log, ln.
{math:<expression>}
Examples
{math:5+5}
# 10
{calc:sqrt(144)}
# 12
{=(x):7} {m:{x}^2}
# 49
Returns a random integer between lowest and
highest (inclusive). Use
rangef for a decimal
result. An optional seed makes the result deterministic.
{range([seed]):<lowest-highest>}
Examples
Your lucky number is {range:1-100}!
# Your lucky number is 47!
{=(h):{rangef:5.0-7.0}} Your estimated height is {h} ft.
# Your estimated height is 5.8 ft.
Converts a number to its ordinal representation (1st, 2nd, 3rd, 4th,
β¦).
{ordinal:<number>}
Examples
You joined as the {ordinal:{server(member_count)}} member!
# You joined as the 42nd member!
Counts how many times the parameter substring appears in the payload
text.
{count(<substring>):<text>}
Examples
{count(the):the cat sat on the mat}
# 2
You said "yes" {count(yes):{args}} time(s).
# You said "yes" 3 time(s).
Randomness Global
Picks a random item from a list split by
, or
~. An optional seed makes the result reproducible for
the same input.
{random([seed]):<item,item,β¦>}
Examples
{random:Carl,Harold,Josh} attempts to pick the lock!
# Josh attempts to pick the lock! # Carl attempts to pick the
lock!
Today's mood: {random:happy~content~productive~tired~chaotic}
# Today's mood: productive
Returns the next item in the list each time the tag is used, cycling
back to the first item after the last. The cycle is identified by
its name parameter, so multiple independent cycles can run
in one tag. Items are separated by
,.
{cycle(<name>):<item,item,β¦>}
Examples
Today's featured color: {cycle(colors):red,green,blue,yellow}
# 1st use: Today's featured color: red # 2nd use: Today's
featured color: green # 3rd use: Today's featured color: blue #
4th use: Today's featured color: yellow # 5th use: Today's
featured color: red (loops back)
Text Global
Replaces every occurrence of original with new in
the payload. The parameter is split on the first comma.
{replace(<original,new>):<text>}
Examples
{replace(o,0):cool bot}
# c00l b0t
{replace( ,_):{user(name)}}
# cool_username
Convert the payload to UPPERCASE or lowercase.
{upper:<text>} or {lower:<text>}
Examples
{upper:hello world}
# HELLO WORLD
{lower:{user(name)}}
# axionuser
Extracts a substring using start and end character
positions (zero-indexed, end is exclusive).
{substr(<start,end>):<text>}
Examples
{substr(0,5):Hello, world!}
# Hello
URL-encodes the payload so it's safe to use in links. Spaces become
%20, special characters are escaped.
{urlencode:<text>}
Examples
https://google.com/search?q={urlencode:{args}}
# https://google.com/search?q=hello%20world
Returns the number of characters in the payload string.
{length:<text>}
Examples
Your message is {length:{args}} characters long.
# Your message is 11 characters long.
Three related string-search blocks:
in β checks if parameter is anywhere in the payload as a substring. Returns
contains β strictly checks if parameter appears as a whole whitespace-split word. Exact match only.
index β finds the zero-based position of the parameter (split by whitespace). Returns
in β checks if parameter is anywhere in the payload as a substring. Returns
true or
false.contains β strictly checks if parameter appears as a whole whitespace-split word. Exact match only.
index β finds the zero-based position of the parameter (split by whitespace). Returns
-1 if not
found.
{in(<substring>):<text>}
{contains(<word>):<text>}
{index(<word>):<text>}
Examples
{in(mute):How does it feel to be muted?}
# true
{contains(mute):How does it feel to be muted?}
# false (the word is "muted", not "mute")
{index(food):I love to eat food everyone does}
# 4
Joins a comma-separated list of items using the given separator.
Useful for reformatting lists.
{join(<separator>):<item,item,β¦>}
Examples
{join( | ):apple,banana,cherry}
# apple | banana | cherry
{join(\n):First line,Second line,Third line}
# First line # Second line # Third line
Formats a timestamp using Python's
strftime codes.
Without a parameter it uses the current time. Pass an ISO or Unix
timestamp as a parameter to format a specific time. See
strftime.org
for the full format reference. Use {unix} to get the
current Unix epoch as a raw number.
{strf([timestamp]):<format>}
Examples
{strf:%B %d, %Y}
# June 13, 2025
{strf:%H:%M}
# 14:32
{unix}
# 1718299200
Collections Global
Returns the item at the given zero-based index from a
comma-separated list. Returns an empty string if the index is out of
range.
{list(<index>):<item,item,β¦>}
Examples
{list(0):apple,banana,cherry}
# apple
{=(fruits):apple,banana,cherry} You picked: {list(1):{fruits}}
# You picked: banana
A shorthand for common redirect targets. The most used form is
{dm}, which redirects the tag response to the invoking
user's DMs instead of the channel. Behaves identically to
{redirect(dm)}.
{dm}
Examples
{dm} Here is your secret code: {range:1000-9999}
# Sends the response privately to the user's DMs