Custom variables
Your own variables always start withDBVAR_:
The easy way: don’t type it, insert it
Typing brackets by hand can go wrong. One missing letter and it does not work. So use the buttons instead:- Next to text boxes in the builder there is a Variables button. Press it, find your variable and press it. It is put into the box for you.
- In a Layout message, the Insert a variable button puts the variable exactly where your cursor is.
- In Card Studio, use the insert a value button next to each text.
- On the Database page, press the gold
{DBVAR_...}chip to copy it, then paste it.
Reading one part of an Object
An Object is a box with smaller named boxes inside, called keys. To show just one key, put a dot and the key name after the variable:Backup values (fallbacks)
Sometimes a box is empty. Maybe someone has no nickname, or a value was never set. Then your message could look broken, likeHi !.
To stop that, give the variable a backup. Write a straight line | after the name, then the backup text:
- If the name is there: Hi Sam!
- If the name is missing or empty: Hi friend!
Backups work in Discord commands, Discord events and WhatsApp flows, and the chat preview in the builder shows them too.
