Message variables
Placeholders like {user} and {uptime} that fill in when a message is sent.
Variables are placeholders in curly brackets that are filled in when a message is sent. They work in Chat Commands, Chat Notifications, Scheduled Messages, alert text and the Marquee. A variable a message doesn't support is left as it is.
Common variables
| Variable | Becomes | Example |
|---|---|---|
{user} | The person who used the command or triggered the event | Hello {user}! |
{channel} | Your channel name | Welcome to {channel}! |
{touser} | The first word after the command (a leading @ is removed); the user's own name if nothing follows | !hug @Sam → {user} hugs {touser} |
{query} | Everything typed after the command | 📢 {query} |
{count} | How many times the command has been used | Used {count} times |
{user_count} | How many times this viewer used it (when the command counts uses) | {user} has used this {user_count} times |
{random_user} | A random recently active viewer | Winner: {random_user}! |
{uptime} | How long you've been live | Live for {uptime} |
{game} | Your current category | Playing {game} |
{random:Yes|No|Maybe} | One of the options, picked at random | 8-ball: {random:Yes|No|Maybe} |
{random_number:1:100} | A random whole number in the range | Rating: {random_number:1:100}/100 |
Event messages (notifications, alerts) also have the event's details, such as {amount}, {tier} or {months}. Each message editor lists the variables it supports.
Formatting
- Fallback:
{query|nothing}uses "nothing" when there's no value. - Formats: add
:money,:number,:duration,:ordinal,:upper,:loweror:title, for example{amount:money}. - Plurals:
{amount:plural:sub:subs}writes "1 sub" or "5 subs".
Related
Still stuck? We're happy to help.Contact support