Variables
Variables fill in live information when the bot answers. Put them in the response of a command, like Hi {user}!.
Variables work in your own commands and in the editable responses of built-in commands like !lurk, !game and !me. A variable without a value becomes empty, so viewers never see {text} in chat.
Viewer
| Variable | Outputs | Example |
|---|---|---|
{user} | Display name of the viewer who used the command | Hi {user}! → Hi DaveL! |
{touser} | The first word after the command, as an @mention. Without a word: the viewer's own name | {user} slaps {touser} with a fish → DaveL slaps @raxx with a fish |
{target} | Same as {touser} | Go follow {target} |
{1} {2} {3} … | The first, second, third word after the command, without @ | !owe @rumi raxx with {1} owes {2} a pizza → rumi owes raxx a pizza |
{followage} | How long the viewer has followed (Twitch) | {user} followed for {followage} → DaveL followed for 2 months, 4 days |
{accountage} | How old the viewer's Twitch account is | Account: {accountage} old |
{watchtime} | The viewer's watch time on your channel | {user} watched {watchtime} → DaveL watched 4 days, 3 hours |
{message_count} | How many messages the viewer sent in your chat | {message_count} messages |
{balance} | The viewer's loyalty balance on all platforms together | You have {balance} → You have 4200 |
{currency_name} | The name of your loyalty points, Fishcoins by default | {balance} {currency_name} → 4200 Fishcoins |
{platform} | Where the message came from: twitch, kick or youtube | Hi from {platform} |
Channel and stream
| Variable | Outputs | Example |
|---|---|---|
{channel} | Your channel name | Welcome to {channel}'s stream |
{username} | Your channel login | fishrift.com/{username} |
{game} | Your current game or category | Playing {game} |
{title} | Your current stream title | Title: {title} |
{uptime} | Time live as HH:MM:SS. Empty when offline | Live for {uptime} → Live for 02:05:09 |
{uptime_hms} | Time live as H:MM:SS. Empty when offline | Live for 2:05:09 |
{viewers} | Current viewer count | {viewers} watching |
{follower_count} | Your Twitch follower count | {follower_count} followers |
{sub_count} | Your active Twitch subscriber count | {sub_count} subs |
{last_follower} | Your most recent follower | Welcome {last_follower} |
{last_sub} | Your most recent subscriber | Thanks {last_sub} |
{date} | Today's date in your timezone, like 4 Oct 2026 | Today is {date} |
{time} | The time in your timezone, 24 hour | It is {time} here |
Random
| Variable | Outputs | Example |
|---|---|---|
{random:MIN-MAX} | A random whole number between MIN and MAX | {user} rolled {random:1-100} → DaveL rolled 42 |
{random_user} | A random viewer who chatted in the last 15 minutes | {random_user} wins a cookie |
Write random numbers with a colon: {random:1-10}. Negative numbers work too.
Counting
| Variable | Outputs | Example |
|---|---|---|
{count} | How many times this command was used, this use included | Used {count} times |
{count NAME} | Adds 1 to the counter NAME and shows the new value | Deaths: {count deaths} → Deaths: 13 |
{count NAME +5} / {count NAME -5} | Adds or takes off a number | {count deaths -1} |
{count NAME +} / {count NAME -} | Adds or takes off 1 | |
{count NAME 0} | Sets the counter to a number | Reset: {count deaths 0} |
{getcount NAME} | Shows a counter without changing it | Deaths so far: {getcount deaths} |
Counter names use letters, numbers, _ and -. A counter is created the first time it changes. See Counters.
Your profile and goals
| Variable | Outputs |
|---|---|
{auto_social:NAME} | A link from your Fishrift profile. NAME is discord, twitter, x, instagram, ig, tiktok, youtube, kick or website |
{point_goal} | Your first running Level Up Goal, like Level 2 · 23 / 50 |
{point_goal:Name} | The Level Up Goal rift with that exact name |
Text from a URL
${customapi.URL} puts the text that a web address returns into the response. For example ${customapi.https://api.example.com/quote}.
- Only
httpsaddresses work, and private or local addresses are blocked. - Fishrift waits up to 3 seconds and uses the first 500 characters.
- When something goes wrong the bot says
[API error]. - You can use
{1},{2}and{random:1-10}inside the URL.
If and else
Show different text depending on a condition:
${if:CONDITION}text when true${else}text when false${endif}The ${else} part is optional. A condition is LEFT OPERATOR RIGHT with one of these operators: =, !=, >, <, >=, <=.
| Left side | Compared with |
|---|---|
{user} | A login, without @ |
{platform} | twitch, kick or youtube |
{permission} | A number or a word: everyone, regular, sub, vip, mod or broadcaster |
{balance} | A number |
{1}, {2} … | Any text |
Examples:
${if:{platform}=twitch}Thanks for watching on Twitch!${else}Thanks for watching on {platform}!${endif}
${if:{permission}>=mod}Mod tools unlocked.${else}Nice try, {user}.${endif}
${if:{balance}>=1000}{user} is rich!${else}{user} needs more {currency_name}.${endif}
${if:{1}=yes}Great!${else}Oh no.${endif}- Text is compared without caring about capitals.
>and<work for{permission}and{balance}. {permission}reads chat badges: broadcaster, mod, VIP, subscriber or everyone.- Conditions can't be nested, and a response can hold up to 20 of them.
StreamElements and Nightbot style
Moving from another bot? These forms are converted automatically:
| You write | Works as |
|---|---|
${user} | {user} |
${channel} | {channel} |
${game} / ${channel.game} | {game} |
${title} / ${channel.title} | {title} |
${count} | {count} |
${target} | {touser} |
${points} | {balance} |
${currency} | {currency_name} |
${uptime} / ${channel.uptime} | {uptime} |
${channel.viewers} | {viewers} |
${channel.subs} | {sub_count} |
${channel.followers} | {follower_count} |
${channel.display_name} / ${channel.name} | {username} |
$(count NAME) / ${count NAME} | {count NAME} |
$(getcount NAME) / ${getcount NAME} | {getcount NAME} |
Other ${...} variables from other bots are not supported and show nothing.
Variables in other places
Some features have their own small set of variables:
| Where | Variables |
|---|---|
| Timers | {channel} and {uptime} |
Raid auto shoutout and !shoutout | {target}, {game}, {title}, {viewers} |
| Offline announcement | {next_stream}, {next_stream_date}, {next_stream_time}, {next_stream_title}, {next_stream_platform} |
| Viewer queue join message | {user}, {position} |
| Song request confirmation | {track}, {artist}, {viewer}, {duration}, {position} |
| Channel point chat messages | {user}, {input}, {reward}, {cost}, {price}, {left}, {count} |
| Alert text | See Alerts |