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

# Variables

> Every value you can put in a Yapin message, and where it comes from.

Variables are words in `{curly brackets}` that are swapped for real values when your bot runs. Type `{` in any text box in the builders to search them, or press **Insert variable**.

## Who and where

| Variable | Example | What it is |
| - | - | - |
| `{yp_user_id}` | `819443f0-…` | The person's Yapin ID |
| `{yp_username}` | `ada` | Their username |
| `{yp_display_name}` | `Ada` | Their display name |
| `{yp_user_mention}` | `@Ada` | Mentions them |
| `{yp_user_avatar}` | `https://files.yapper.website/avatars/…` | Their picture |
| `{yp_server_id}` | `5efc22e0-…` | The server's ID |
| `{yp_server_name}` | `DogeBot Community` | The server's name |
| `{yp_member_count}` | `128` | How many members it has |
| `{yp_channel_id}` | `1e41d8b2-…` | The channel it happened in |
| `{yp_bot_id}` `{yp_bot_name}` | `DogeBot` | Your bot |
| `{yp_time}` | `2026-10-29T07:40:00Z` | When it happened |

## What happened

| Variable | Example | What it is |
| - | - | - |
| `{yp_event}` | `message` | The kind of event |
| `{yp_message_id}` | `1b19db3c-…` | The message that started it |
| `{yp_content}` | `hello everyone` | The message text |
| `{yp_mentioned}` | `true` | Whether your bot was mentioned |
| `{yp_command}` | `give` | The command name |
| `{yp_args}` | `@Ada 50` | Everything after the command |
| `{yp_arg1}` … `{yp_arg5}` | `@Ada`, `50` | Each word after the command |
| `{yp_args_count}` | `2` | How many words |
| `{yp_custom_id}` | `buy-coffee` | The button that was clicked |
| `{yp_emoji}` | `🔥` | The reaction |

## Set by blocks

| Variable | Set by | What it is |
| - | - | - |
| `{yp_sent_id}` `{yp_sent_channel_id}` | Message | The message your bot just sent |
| `{yp_member_username}` `{yp_member_display_name}` | Look up a member | Their names |
| `{yp_member_nickname}` | Look up a member | Their nickname in this server |
| `{yp_member_roles}` | Look up a member | Their role IDs, comma separated |
| `{yp_member_joined_at}` | Look up a member | When they joined |
| `{yp_member_timed_out}` | Look up a member | `true` while timed out |
| `{yp_created_channel_id}` | Create a channel | The new channel |
| `{yp_deleted_count}` | Clear recent messages | How many were deleted |
| `{card}` | Make an image card | The card's picture |

## Shared variables

These work on every platform, Yapin included:

| Variable | What it is |
| - | - |
| `{user}` `{user_name}` `{user_id}` `{user_avatar}` | The person |
| `{server}` `{server_id}` `{server_members}` `{server_icon}` | The server |
| `{channel}` `{channel_name}` `{channel_id}` | The channel |
| `{random[1,100]}` | A random number between two values |
| Your saved values, like `{DBVAR_coins}` | Values you keep in Data Storage |

## Tips

* **Check a member's role:** add *Look up a member*, then a condition: `{yp_member_roles}` **Contains** the role's ID.
* **Count something:** make a saved value (Data Storage), then use *Do the maths* with `+ 1`.
* **Ping someone from a command:** `/hug @Ada` → `{yp_user_mention} hugs {yp_arg1} 🤗`.


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