Bot Command Variables

Create dynamic and interactive answers using variables inside your custom command response.

You can insert special placeholders (variables) in your custom commands. When a command is triggered in chat, SasaBot will automatically replace these placeholders with real-time values.

Variable Description Usage & Output Example
$(user) or $user Display name of the chatter who triggered the command. Command response: Hello $user!
Output: Hello lostidze!
$(touser) First argument of the command (e.g. !love lostidze -> lostidze). If no argument is provided, falls back to the sender. Command response: Greeting $(touser).
Output: Greeting lostidze.
$(channel) or $channel The broadcaster's login name of the channel. Command response: Welcome to $channel stream!
Output: Welcome to skuffix508 stream!
$(args) or $args All arguments provided after the command, joined by space. Command response: You wrote: $args
Output: You wrote: hello how are you
$(command) or $command The name of the triggered command. Command response: Triggered: $command
Output: Triggered: info
$(count) or $count A dynamic counter of how many times this command was executed. Command response: Command used $count times!
Output: Command used 42 times!
$(time) or $time Current time in Moscow timezone (HH:MM:SS format). Command response: Moscow time is $time
Output: Moscow time is 18:42:05
$(date) or $date Current date in Moscow timezone (DD.MM.YYYY format). Command response: Current date is $date
Output: Current date is 18.05.2026
$(uptime) or $uptime How long the bot has been running continuously. Command response: Uptime: $uptime
Output: Uptime: 3h 12m 45s
$(random) or $random Generates a random number from 1 to 100. Command response: Rate: $random/100
Output: Rate: 87/100
$(percentage) or $percentage Generates a random percentage (from 0% to 100%). Command response: Match probability is $percentage!
Output: Match probability is 73%!
$(randomuser) or $randomuser Picks a random chatter from the recently active users list in chat. Command response: Lucky person: $randomuser
Output: Lucky person: @chatter_alex
$(url) or $url The public website address of this SasaBot dashboard. Command response: Control dashboard: $url
Output: Control dashboard: https://sasabot.ru
$(usercolor) or $usercolor The hex color code of the sender's nickname. Command response: Color: $usercolor
Output: Color: #00FF7F
$(query) or $query URL-encoded version of all input arguments. Command response: Search: https://google.com/search?q=$query
Output: Search: https://google.com/search?q=cool%20bot
$(mention) or $mention Appends a "@" sign to the sender's display name. Command response: Hi $mention!
Output: Hi @lostidze!
$(choice:option1|option2|...) Picks one random option from the provided list (supports | or , separators). Command response: Answer: $(choice: Yes | No | Maybe)
Output: Answer: Yes
$(roll:min-max) or $(roll:max) or $(roll) Rolls a random number in a custom range (defaults to 1-100). Command response: Dice: $(roll:1-6)
Output: Dice: 4
$(math:expression) Evaluates standard mathematical operations (safely supports +, -, *, /, %, parenthesis). Command response: Result: $(math: (2 + 2) * 5)
Output: Result: 20
$(arg:N) or $(arg:N-M) or $(arg:N+) Advanced argument extraction. $(arg:2+) extracts all words starting from word 2. Command: !say hello to the world
Response: Message: $(arg:2+)
Output: Message: to the world
$(upper:text) Converts the provided text to UPPERCASE. Command response: $(upper: shout)
Output: SHOUT
$(lower:text) Converts the provided text to lowercase. Command response: $(lower: SILENCE)
Output: silence
$(length:text) Returns the exact length (number of characters) of the text. Command response: Length: $(length: lost)
Output: Length: 4
$1, $2, $3... Inserts a specific positional argument of the command (e.g., $1 is the first word after the command). Command: !trade CS2 Dota
Command response: Selling $1 for $2.
Output: Selling CS2 for Dota.
$(hour), $(minute), $(second) Hours, minutes, and seconds in Europe/Moscow timezone. Response: $hour:$minute:$second
Output: 15:42:05
$(year), $(month), $(day), $(dayofweek) Moscow date parts and full weekday name. Response: $dayofweek, $year
Output: Понедельник, 2026
$(timestamp) Current Unix epoch timestamp in milliseconds. Response: Time: $timestamp
Output: Time: 1779068437252
$(user_id), $(user_type) Twitch User ID and sender role (broadcaster, moderator, vip, subscriber, viewer). Response: $user ($user_type) ID: $user_id
Output: skuffix (broadcaster) ID: 123456
$(is_mod), $(is_sub), $(is_vip) Booleans indicating if the user has specific Twitch badges. Response: VIP? $is_vip
Output: VIP? true
$(args_count) Number of arguments passed to the command. Response: Words: $args_count
Output: Words: 3
$(weather) or $(weather:city) Fetches weather information from wttr.in for saved or specified location. Response: Weather: $(weather:Томск)
Output: Weather: Tomsk: ⛅️ +12°C
$(md5:text), $(sha256:text) Generates MD5 or SHA256 hashes of the provided text. Response: $(md5:hello)
Output: 5d41402abc4b2a76b9719d911017c592
$(base64_encode:text), $(base64_decode:encoded) Encodes text to or decodes from Base64. Response: $(base64_encode:bot)
Output: Ym90
$(hex_encode:text), $(hex_decode:encoded) Encodes text to or decodes from Hexadecimal. Response: $(hex_encode:hi)
Output: 6869
$(reverse:text) Reverses the characters in the text. Response: $(reverse:sasabot)
Output: tobasas
$(trim:text), $(word_count:text) Trims whitespace or counts the words in the text. Response: $(word_count:hello world)
Output: 2
$(capitalize:text) Capitalizes the first character of the text. Response: $(capitalize:bot)
Output: Bot
$(repeat:text|count) Repeats the text N times. Response: $(repeat:ha|3)
Output: hahaha
$(replace:text|search|replace) Replaces occurrences of search text with replace. Response: $(replace:hello apple|apple|pear)
Output: hello pear
$(substr:text|start|length) Extracts a substring from text. Response: $(substr:sasabot|4|3)
Output: bot
$(even_odd:number) Returns 'even' or 'odd' for the number. Response: $(even_odd:4)
Output: even
$(abs:number), $(sqrt:number), $(round:number) Mathematical absolute value, square root, or rounding. Response: $(round:4.6)
Output: 5
$(min:a,b,c), $(max:a,b,c) Finds the minimum or maximum in a comma-separated list of numbers. Response: $(max:5,12,3)
Output: 12