# Placeholders

> All the placeholders in MayaBot messages and the modules they work in.

Source: https://docs.mayabot.eu/reference/placeholders

A placeholder is a word between two `%`, such as `%server%`, that MayaBot replaces with a value when it sends the message. It's written all in lower case. A placeholder that doesn't exist, or doesn't work in that module, stays written as it is.

Typing `%` in a field shows suggestions: arrow keys to choose, **Enter** or **Tab** to insert, **Esc** to close. The **Variables** list in each panel shows the available ones, with a button to copy them.

## List

| Placeholder | Becomes | Example |
|---|---|---|
| `%mention%` | Member mention | @Mario |
| `%username%` | Username | mario_99 |
| `%displayname%` | Display name in the server, otherwise global name, otherwise username | Super Mario |
| `%userid%` | User ID | 123456789012345678 |
| `%avatar%` | Avatar link | https://cdn.discordapp.com/... |
| `%createdat%` | Account creation date | 3 March 2021 |
| `%server%` | Server name | My server |
| `%serverid%` | Server ID | 987654321098765432 |
| `%servericon%` | Server icon link | https://cdn.discordapp.com/... |
| `%membercount%` | Member count | 128 |
| `%count%` | Last valid Counting number | 41 |
| `%next%` | Next number to write | 42 |
| `%best%` | Counting channel record | 57 |
| `%channel%` | Counting channel mention | #counting |
| `%channelid%` | Counting channel ID | 112233445566778899 |
| `%kicks_here%` | People caught by the Honeypot in this server | 12 |
| `%kicks_all%` | People caught by the Honeypot across all servers with MayaBot | 3450 |

## Where they work

| Module | Placeholders |
|---|---|
| [Automatic message](https://docs.mayabot.eu/modules/auto-messages) | Server ones: `%server%`, `%serverid%`, `%servericon%`, `%membercount%` |
| [Welcome](https://docs.mayabot.eu/modules/welcome) and [Leaves](https://docs.mayabot.eu/modules/leaves) | Member and server ones |
| [Verification](https://docs.mayabot.eu/modules/verify) | Server ones |
| [Honeypot](https://docs.mayabot.eu/modules/honeypot) | `%kicks_here%`, `%kicks_all%` and the server ones |
| [Counting](https://docs.mayabot.eu/modules/counting) | Member, counting (`%count%`, `%next%`, `%best%`, `%channel%`, `%channelid%`) and server ones |
| [Temporary channel](https://docs.mayabot.eu/modules/temp-channels), channel name | `%username%`, `%displayname%`, `%userid%`, `%createdat%`, `%server%`, `%serverid%`, `%membercount%` |
| [Temporary channel](https://docs.mayabot.eu/modules/temp-channels), message with the button | Server ones |

The member placeholders are `%mention%`, `%username%`, `%displayname%`, `%userid%`, `%avatar%` and `%createdat%`.

## Useful rules

- **Image fields**: `%avatar%` and `%servericon%` on their own work as an image link, for example in the thumbnail or the author icon of an embed. They don't work as button links.
- **Inside a link**: the other placeholders go into the link in a safe form, with spaces and symbols converted.
- **Names with symbols**: in `%username%` and `%displayname%` characters such as `*` and `_` stay as written and don't change the message formatting.
- **Dates**: in messages `%createdat%` uses Discord's date format, which everyone sees in their own language and time zone. In the Welcome card and in temporary channel names it becomes DD/MM/YYYY.
- **Notifications**: `%mention%` only notifies the member in the Welcome channel message with **Notify the new member**, and in the Counting Mistake and New record messages.
- **Length**: character limits are counted on the text you write. If after replacement the message goes over Discord's limits, MayaBot shortens it.
- **Preview**: in the dashboard the placeholders use your account and your server as an example, and 128 as the member count.
