> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dogebot.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Show a variable in a message

> Curly brackets, the insert button, keys and backup values.

To show what is inside a box, write its name inside **curly brackets** anywhere you can type text: messages, embeds, layout messages, button labels, image cards and most block settings.

## Custom variables

Your own variables always start with `DBVAR_`:

```text theme={null}
You have {DBVAR_coins} coins and you are level {DBVAR_level}.
```

For a **User** variable, the bot shows the value of the **person who used the command** (or the person the event is about).

## 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.

The list in the picker only shows values that work in the place you are building. A WhatsApp flow, for example, never shows Discord values.

## 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:

```text theme={null}
Coins: {DBVAR_profile.coins}
Gems: {DBVAR_profile.gems}
```

See [Objects and Collections](/variables/objects-and-collections).

## 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, like `Hi !`.

To stop that, give the variable a **backup**. Write a straight line `|` after the name, then the backup text:

```text theme={null}
Hi {user_name|friend}!
```

* If the name is there: **Hi Sam!**
* If the name is missing or empty: **Hi friend!**

More examples:

| You write | If the value is empty, the bot shows |
| - | - |
| `{DBVAR_coins\|0}` | `0` |
| `{DBVAR_bio\|No bio yet}` | `No bio yet` |
| `Hi {wa_name\|there}` | `Hi there` |

Backups work in Discord commands, Discord events and WhatsApp flows, and the chat preview in the builder shows them too.

<Warning>
  **Secrets** never use a backup. If a secret is missing, it stays missing, so a wrong password is never sent by accident.
</Warning>

## Common mistakes

| Problem | Why | Fix |
| - | - | - |
| The message shows `{DBVAR_coins}` as plain text. | The name is spelled wrong, or the variable does not exist. | Copy the chip from the Database page instead of typing. |
| The message shows nothing where the value should be. | The box is empty. | Give it a starting value, or add a backup like `{DBVAR_coins\|0}`. |
| Everyone shows the same coins. | The variable is not a **User** variable. | Make a **User → Number** variable instead. See [Types of variables](/variables/types-of-variables). |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.