Variables
Use dynamic placeholders to personalize command responses with user, server, and contextual information.
Overview
Variables are placeholders in command responses that get replaced with real data when the command executes. They allow you to create dynamic, personalized responses without manually entering user or server information.
Variables use curly braces syntax like {variable_name}. When a user triggers the command, SYNTHET automatically replaces variables with the appropriate values.
User Variables
Get information about the user who triggered the command:
{user} | Username of the person who triggered the command | @john_doe | Hello {user}! |
{user_id} | Discord numeric ID of the user | 123456789012345678 | User ID: {user_id} |
{mention} | Mention the user (creates a ping) | @john_doe | {mention} your turn! |
{user_avatar} | URL to the user's profile picture | https://... | Avatar: {user_avatar} |
{user_created} | Date the user's account was created | 2020-01-15 | Member since {user_created} |
{user_joined} | Date the user joined this server | 2023-06-20 | Joined {user_joined} |
{user_roles} | List of all roles the user has | @Admin, @Moderator | Your roles: {user_roles} |
{user_highest_role} | User's highest priority role | @Moderator | Rank: {user_highest_role} |
Server Variables
Reference information about the Discord server:
{server} | Name of the Discord server | My Awesome Server | Welcome to {server}! |
{server_id} | Numeric ID of the server | 987654321098765432 | Server ID: {server_id} |
{server_icon} | URL to the server's icon/logo | https://... | Icon: {server_icon} |
{member_count} | Total number of members in the server | 245 | We have {member_count} members! |
{owner} | Name of the server owner | AdminUser | Owner: {owner} |
{owner_id} | Discord ID of the server owner | 111222333444555666 | Owner ID: {owner_id} |
{creation_date} | Date the server was created | 2019-03-10 | Created {creation_date} |
{server_region} | Server's geographic region | us-east-1 | Region: {server_region} |
Channel Variables
Access information about the current channel where the command is used:
{channel} | Name of the channel (without #) | general | Welcome to {channel}! |
{channel_id} | Numeric ID of the channel | 333444555666777888 | Channel ID: {channel_id} |
{channel_topic} | Channel topic/description | General discussion | Topic: {channel_topic} |
{channel_type} | Type of channel (text, voice, category) | text | Type: {channel_type} |
{channel_created} | Date the channel was created | 2020-05-12 | Channel created {channel_created} |
{channel_messages} | Approximate number of messages in channel | 5,234 | {channel_messages} messages |
{channel_mention} | Mention the channel (creates a link) | #general | Check {channel_mention} |
Time Variables
Include current date and time information:
{now} | Current date and time | 2024-01-15 14:30:45 | Executed {now} |
{date} | Current date only | 2024-01-15 | Date: {date} |
{time} | Current time only | 14:30:45 | Time: {time} |
{day} | Day of the week | Monday | Happy {day}! |
{month} | Current month name | January | Welcome to {month} |
{year} | Current year | 2024 | Year: {year} |
{timestamp} | Unix timestamp | 1705334445 | Timestamp: {timestamp} |
Conditional Variables
Show different content based on conditions:
If User Has Role
Shows text only if user has the Moderator role
If User is Admin
Shows text only if user has administrator permissions
If/Else Statement
Shows different content based on admin status
Random Variables
Create dynamic responses with random selection:
Random Choice
Randomly picks one option separated by pipes
Random Number
Random number between 1 and 100
Combining Random with User
Mix variables for personalized random content
Variable Examples
See how to use variables in real commands:
Welcome Message
Welcome to {server}! I'm {bot_name}, and we're glad you're here, {mention}. Please read {channel_mention} and follow the rules!
Shows: "Welcome to My Server! I'm SYNTHET, and we're glad you're here, @john_doe. Please read #rules and follow the rules!"
Server Info Command
🏢 **Server:** {server} | 👥 **Members:** {member_count} | 👑 **Owner:** {owner} | 📅 **Created:** {creation_date}
Shows complete server statistics in one line
Personalized Compliment
{mention} {random:You're awesome!|You're incredible!|You're amazing!|You're fantastic!}✨
Each use gives a different compliment to the user
Stats Command
📊 {user} stats - Joined: {user_joined} | Highest Role: {user_highest_role} | Account Created: {user_created}
Displays user membership and account information
Conditional Admin Command
{if:admin}Admin dashboard for {user}. Last action: {now}{else}You don't have access!{endif}
Different message based on user's admin status
Formatting with Variables
Format and style variables within your command responses:
Bold Text
Makes the username bold in Discord
Italic Text
Makes text italic
Code Block
Formats as inline code
Headers
Creates a large header (use #, ##, ### for sizes)
Special Variables
Additional variables for advanced use cases:
{bot_name}
The bot's username (usually SYNTHET)
{command_name}
The exact trigger that was used to invoke the command
{arg1}, {arg2}, etc.
Access command arguments passed by the user
{args}
All arguments combined as a single string
Tips & Best Practices
- • Use {mention} to tag users instead of just their name
- • Combine multiple variables for rich, personalized responses
- • Use {random:option1|option2|option3} to avoid repetitive messages
- • Check for roles with {if:role:RoleName} before granting access
- • Use {user_highest_role} to show a user's main rank
- • Include {now} in logs or actions for timestamps
- • Make responses personal with {user} - it feels more welcoming
- • Use conditional variables to create context-aware responses
- • Format important information with **bold** or __underline__
- • Remember variable names are case-sensitive - use exact syntax