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

# Message variables

> The 69 variables you can use in templates, welcome messages, and announcements.

Write a variable as `{token}` anywhere Tessera composes a message — panels built with `=panel`,
welcome and leave messages, announcements, and sticky messages. An unknown token resolves to
`[unknown:name]` rather than failing, so a typo never blocks a send.

**69 variables across 14 categories.**

### Guild

| Variable | Resolves to |
| - | - |
| `{server_name}` | Guild display name |
| `{server_id}` | Guild ID |
| `{member_count}` | Guild member count |
| `{guild_name}` | Alias of server\_name |
| `{guild_id}` | Alias of server\_id |
| `{guild_icon}` | Guild icon URL, or empty when the guild has none |
| `{guild_owner}` | Guild owner mention |
| `{guild_created}` | When the guild was created, as a Discord timestamp |

### User

| Variable | Resolves to |
| - | - |
| `{user}` | User mention |
| `{user_id}` | User ID |
| `{username}` | Username |
| `{display_name}` | Server nickname or display name, falling back to the username |
| `{user_avatar}` | Avatar URL |
| `{user_created}` | Account age, as a Discord relative timestamp |
| `{user_joined}` | When the member joined this server, as a Discord relative timestamp |

### Channel

| Variable | Resolves to |
| - | - |
| `{channel_id}` | Channel ID |
| `{channel_name}` | Channel name |
| `{channel_mention}` | Channel mention |

### Date & Time

| Variable | Resolves to |
| - | - |
| `{date}` | Current date (UTC, YYYY-MM-DD) |
| `{time}` | Current time (UTC, HH:mm) |
| `{timestamp}` | Now, as a full Discord timestamp in the reader's timezone |
| `{timestamp_short}` | Now, as a short Discord timestamp |
| `{timestamp_relative}` | Now, as a Discord relative timestamp ("2 minutes ago") |
| `{unix}` | Now, as Unix seconds |

### Leveling

| Variable | Resolves to |
| - | - |
| `{level}` | Member's current level |
| `{xp}` | Member's total XP |
| `{rank}` | Member's leaderboard rank |

### Last.fm

| Variable | Resolves to |
| - | - |
| `{lastfm_username}` | Linked Last.fm username |
| `{lastfm_now_playing}` | Currently playing track |

### Boost

| Variable | Resolves to |
| - | - |
| `{boost_count}` | Guild boost count |
| `{booster_role_name}` | Member's custom booster role name |

### Punishments

| Variable | Resolves to |
| - | - |
| `{warning_count}` | Active warning count |
| `{note_count}` | Active staff note count |
| `{last_warning_reason}` | Most recent warning reason |

### Moderation

| Variable | Resolves to |
| - | - |
| `{case_number}` | Case number |
| `{case_type}` | Action taken (timeout, ban, …) |
| `{case_reason}` | Reason given |
| `{case_duration}` | Duration, or 'permanent' when the action has none |
| `{case_expires}` | When a timed action lapses, as a Discord relative timestamp |
| `{moderator}` | Moderator mention |
| `{moderator_id}` | Moderator ID |
| `{moderator_name}` | Moderator username |
| `{case_id}` | Internal case id |

### Event log

| Variable | Resolves to |
| - | - |
| `{event_type}` | Event type (message\_delete, member\_roles, …) |
| `{event_summary}` | The bot's one-line description of what happened |
| `{event_actor}` | Who caused the event, as a mention, when known |
| `{event_actor_id}` | Who caused the event, as an ID, when known |
| `{message_id}` | The message's ID, for message events |
| `{message_link}` | A jump link to the message, for message events |
| `{message_before}` | The message text before an edit, or the deleted text |
| `{message_after}` | The message text after an edit |

### Core

| Variable | Resolves to |
| - | - |
| `{ticket_count}` | Total ticket count |
| `{open_ticket_count}` | Open ticket count |
| `{prefix}` | Bot prefix |
| `{bot_name}` | Bot display name |

### Social

| Variable | Resolves to |
| - | - |
| `{source_name}` | Social source display name |
| `{source_type}` | Social source type |
| `{post_title}` | Latest post title |
| `{post_url}` | Latest post URL |
| `{post_author}` | Latest post author |
| `{post_published_at}` | Latest post publish time |
| `{post_detected_at}` | When Tessera detected the post |
| `{post_summary}` | Latest post summary |

### Roblox

| Variable | Resolves to |
| - | - |
| `{roblox_username}` | Linked Roblox username |
| `{roblox_display_name}` | Linked Roblox display name |
| `{roblox_user_id}` | Linked Roblox user ID |

### YouTube

| Variable | Resolves to |
| - | - |
| `{youtube_latest_title}` | Latest YouTube video title |
| `{youtube_latest_url}` | Latest YouTube video URL |
| `{youtube_latest_published_at}` | Latest YouTube publish time |


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