Skip to content

Command variable usage

Command variables are placeholders in a custom command response. When someone uses the command, Synchra replaces each variable with live data.

Variables use curly braces:

{variable_name}
{variable_name option}
{variable_name option "option with spaces"}

Some variables only display data. Others update state, set defaults, or read command input. Check each variable page for the exact behavior.

Command name:

!countdown

Command response:

The event starts in {countdown 2026-07-01T18:00:00+02:00}

When someone types !countdown, the bot replies with the remaining time until the event.

VariableUseExample command response
{user}Mention the target user or the sender.Hello, {user}!
{sender}Mention the person who triggered the command.Requested by {sender}.
{countdown <iso_date>}Show time left until a date.Only {countdown 2026-07-01T18:00:00+02:00} left.
{random.int 1 100}Generate a random number.Your roll: {random.int 1 100}
{spotify.song_name}Show the current Spotify song.Now playing: {spotify.song_name}

Activity variables only work when a command is run by an activity trigger. If the same response runs from a chat message trigger, activity variables are left unchanged.

Example response:

{activity.viewer_display_name} resubscribed for {activity.count} {activity.count_name}: {activity.message}
VariableUse
{activity.viewer_display_name}Viewer display name.
{activity.viewer_name}Viewer username.
{activity.type_display_name}Activity type display name.
{activity.type}Raw activity type, such as resub or sub_gift.
{activity.sub_type_display_name}Activity subtype display name.
{activity.sub_type}Raw activity subtype.
{activity.count}Raw numeric activity count.
{activity.amount}Count adjusted for decimal places and currency.
{activity.count_name}Count unit, such as months, subs, or bits.
{activity.message}User-entered activity message text, assembled from message parts when available.
{activity.system_message}Platform-generated activity message, when available.
{activity.recipient_display_name}First gift recipient display name, when available.
{activity.provider}Activity provider, such as twitch or youtube.
{activity.provider_message_id}Provider message ID for the activity.
{activity.created_at}Activity time as an ISO timestamp.

system_message comes from the platform and can differ by provider.

PageIncludes
Account ageAccount creation age, date, and date-time
ActivityActivity trigger data
CategoryRead or update the stream category
ChannelChannel name
CountNamed counters
CountdownTime remaining until a date
FaceitFaceit ELO and level
FollowageFollow duration and follow date
GamesSlots and roulette
Permit managerTemporary link permits
PointsPoints balances and leaderboard data
QuotesQuote management and display
RandomRandom numbers and choices
SenderCommand sender
SpotifySong and playlist data
TimeCurrent time by timezone
TitleRead or update stream title
UptimeCurrent stream uptime
UserTarget user or sender fallback
Viewer statsWatchtime and stream history
WeatherWeather lookup data