Replace Variables - crowbartools/Firebot GitHub Wiki
WARNING:
The variables in this document were for Firebot v4. They do not work in Firebot v5. To see available variables for v5, click the blue "$vars" button in bottom right of any relevant text field.
List of text replace variables currently available in Firebot.
General
These variables can be used anywhere (Mixplay, commands, events, etc).
| Variable | Description |
|---|---|
| $(user) | Replaced by the name of the person running the button, command, or event |
| $(time) | The current time. Use $(time24) for 24 hour time. |
| $(date) | The current date, formatted ie "Jun 1st 2018" |
| $(uptime) | How long the stream has been broadcasting |
| $(streamer) | The name of the account signed in as the Streamer |
| $(bot) | The name of the account signed in as the Bot |
| $(game) | The game you are currently playing |
| $(game[streamerName]) | The game the provided streamer last played. Can be used in conjunction with $(arg) or $(target), ie $(game[$(target)]) |
| $(streamTitle) | The current title of your stream. |
| $(userAvatarUrl) | The url of the users avatar. Useful in Show Image effects! |
| $(userAvatarUrl[name]) | The url of the given users avatar. |
| $(patronageEarned) | Total number of patronage sparks earned. |
| $(patronageNextMilestoneTarget) | The next milestone spark target. |
| $(patronageNextMilestoneReward) | The next milestone reward value, in dollars. |
| $(patronagePreviousMilestoneTarget) | The previous milestone spark amount. |
| $(patronagePreviousMilestoneReward) | The previous milestone reward value, in dollars. |
| $(randomViewer) | The name of a random viewer in chat. |
| $(randomNumber[low-high]) | Get a random number between the low and high numbers, ie $(randomNumber[1-10]) |
| $(math[expression]) | Evaluate the given expression. Can combine with other vars like randomNumber, ie $(math[2 + $(randomNumber[1-5])]) |
| $(readApi[url]) | Calls the given url and inserts the response. If the response is JSON, you can traverse the object. |
| $(readFile[filepath]) | Gets the contents of the given txt file, ie $(readFile[C:/some/path/file.txt]) |
| $(readRandomLine[filepath]) | A random line from the given txt file |
Interactive & Commands
These variables only work when used in an interactive control or a chat command
| Variable | Description |
|---|---|
| $(text) | Replaced by the interactive button text or the chat command ID. |
| $(cost) | Replaced by the cost of the command or button. |
| $(cooldown) | Replaced by the cooldown of the command or button. |
Interactive Only
These variables only work when used in an interactive control.
| Variable | Description |
|---|---|
| $(textboxValue) | Only works if this effect is attached to a Textbox. This will contain the value of the Textbox. |
| $(tooltip) | The tooltip of the button that was pressed. |
| $(progress) | The current percentage of the progress bar on a button. |
| $(activeState) | The active state of a button, displays 'enabled' or 'disabled'. |
| $(activeStateReverse) | The reverse active state of a button, displays 'disabled' or 'enabled'. |
Commands Only
These variables only work when used in a chat command.
| Variable | Description |
|---|---|
| $(arg#) | Replaced by the argument provided after a chat command. For example, $(arg) or $(arg1) pulls the first word after the command, whereas $(arg5) would pull the fifth word. |
| $(arg#-#) | Grab a range of arguments. Combines them with spaces. IE if command was "!command these are some words": $(arg2-3) = "are some", $(arg2-last) = "are some words", $(argAll) = "these are some words" |
| $(target) | Acts like the $(arg) variable but strips out any leading "@", useful when the argument is expected to be a username. Like $(arg), it also supports the $(target#) format for selecting different words. |
Events Only
These variables only work when used in an event.
| Variable | Description | Event(s) |
|---|---|---|
| $(subMonths) | This is replaced by the total months a person has been subbed. | Subscribe Event |
| $(gifterUsername) | This is replaced by the user who gave the gift sub. | Gifted Subscription Event |
| $(giftReceiverUsername) | This is replaced by the user who received the gift sub. | Gifted Subscription Event |
| $(skillName) | Name of associated Skill. | Skill Event & Skill - Sticker Only Event |
| $(skillIconUrl) | URL of icon for associated Skill. If sticker, it will be the sticker image. | Skill Event & Skill - Sticker Only Event |
| $(skillCost) | Cost of the associated Skill. | Skill Event & Skill - Sticker Only Event |
| $(skillCurrencyType) | Type of currency used for associated Skill. | Skill Event & Skill - Sticker Only Event |
| $(skillGifUrl) | The url of the GIF. Can be used in Show Image effect! | Skill - GIF Only Event |
| $(elAmount) | ExtraLife donation amount. If user chooses not to disclose amount, it will say 'undisclosed amount'. | ExtraLife Event |
| $(elMessage) | ExtraLife donation message. | ExtraLife Event |