Skip to main content

Placeholders Reference

Placeholders allow you to include dynamic information in webhook messages. When a notification is sent, placeholders are replaced with actual values.

How to Use Placeholders

Type placeholders in curly braces within your message content:

Hello, {user.mention}! You received: {roles.added.names}

Output:

Hello, @JohnDoe! You received: VIP, Premium

Tips

  • Placeholders are case-sensitive
  • Invalid placeholders appear as-is (not replaced)
  • Use the placeholder dropdown in the editor for suggestions

User Placeholders

Information about the member whose roles changed.

PlaceholderDescriptionExample Output
{user.mention}@mentions the user@JohnDoe
{user.nickname}Server nickname (or username if no nickname)JohnDoe
{user.tag}Username with discriminatorJohnDoe#1234
{user.id}User's Discord ID123456789012345678
{user.avatar_url}URL to user's avatar imagehttps://cdn.discordapp.com/avatars/...

Usage Examples

Simple mention:

{user.mention} just got updated!

Detailed log:

User: {user.tag}
ID: {user.id}

Role Placeholders

Information about the roles that were added or removed.

PlaceholderDescriptionExample Output
{roles.added.names}Names of roles that were addedVIP, Premium
{roles.added.mentions}@mentions of added roles@VIP, @Premium
{roles.removed.names}Names of roles that were removedGuest, Trial
{roles.removed.mentions}@mentions of removed roles@Guest, @Trial

Usage Examples

Simple notification:

Roles added: {roles.added.names}
Roles removed: {roles.removed.names}

Mentioning roles:

{user.mention} now has: {roles.added.mentions}

Notes

  • If no roles were added, {roles.added.names} may be empty
  • If no roles were removed, {roles.removed.names} may be empty
  • Multiple roles are separated by commas

Server Placeholders

Information about the Discord server.

PlaceholderDescriptionExample Output
{server.name}Server nameMy Awesome Server
{server.id}Server's Discord ID987654321098765432
{server.member_count}Total number of members1,234
{server.description}Server descriptionWelcome to our community!
{server.icon_url}URL to server iconhttps://cdn.discordapp.com/icons/...
{server.banner_url}URL to server bannerhttps://cdn.discordapp.com/banners/...
{server.vanity_url}Custom invite URL (if set)discord.gg/myserver
{server.boost_count}Number of server boosts15
{server.boost_tier}Server boost level (0-3)2

Usage Examples

Server branding:

Welcome to {server.name}!

Statistics:

Server: {server.name} ({server.member_count} members)
Boost Level: {server.boost_tier} ({server.boost_count} boosts)

Notes

  • {server.description} may be empty if not set
  • {server.vanity_url} may be empty if no vanity URL
  • {server.banner_url} may be empty if no banner

Channel Placeholders

Information about the channel receiving the webhook.

PlaceholderDescriptionExample Output
{channel.name}Channel namerole-logs
{channel.mention}#mentions the channel#role-logs
{channel.topic}Channel topic/descriptionLog channel for role changes
{channel.url}Direct link to channelhttps://discord.com/channels/...
{channel.category.name}Parent category nameAdmin Channels

Usage Examples

Channel reference:

This log was sent to {channel.mention}

Full context:

Channel: {channel.name}
Category: {channel.category.name}

Notes

  • {channel.topic} may be empty if not set
  • {channel.category.name} may be empty if channel has no category

Bot Placeholders

Information about the RoleLogic bot.

PlaceholderDescriptionExample Output
{bot.nickname}Bot's nickname in the serverRoleLogic
{bot.mention}@mentions the bot@RoleLogic
{bot.avatar_url}URL to bot's avatarhttps://cdn.discordapp.com/avatars/...

Usage Examples

Attribution:

Automated by {bot.mention}

Time and Date Placeholders

Timestamps and date information.

PlaceholderDescriptionExample Output
{time:short}Short time format3:45 PM
{time:long}Long time format3:45:30 PM
{date:short}Short date format01/15/2024
{date:long}Long date formatJanuary 15, 2024
{timestamp}Discord timestamp (renders dynamically)<t:1705329930>
{timestamp:r}Relative timestamp5 minutes ago

Usage Examples

Simple timestamp:

Changed at {time:short} on {date:short}

Discord timestamp (recommended):

Changed: {timestamp}

Relative time:

Updated {timestamp:r}

About Discord Timestamps

Discord timestamps (like {timestamp} and {timestamp:r}) are special. They render differently for each user based on their timezone and Discord settings. This is usually the best choice for logging.

FormatCodeResult
Default{timestamp}January 15, 2024 3:45 PM
Relative{timestamp:r}5 minutes ago

Complete Example

Here's a comprehensive webhook message using multiple placeholders:

🔔 **Role Update in {server.name}**

**Member:** {user.mention} ({user.tag})
**Added:** {roles.added.names}
**Removed:** {roles.removed.names}

📅 {timestamp}

_Automated by RoleLogic_

Sample Output:

🔔 **Role Update in My Awesome Server**

**Member:** @JohnDoe (JohnDoe#1234)
**Added:** VIP, Premium Access
**Removed:** Trial Member

📅 January 15, 2024 3:45 PM

_Automated by RoleLogic_

Placeholder Suggestions

When typing in the webhook message editor:

  1. Type { to open the suggestion dropdown
  2. Continue typing to filter suggestions
  3. Click a suggestion to insert it
  4. Suggestions are organized by category

If you see "No matching placeholders," check your spelling.


Troubleshooting

Placeholder Not Replaced

If you see the raw placeholder (e.g., {user.mention}) in your output:

  • Check spelling and capitalization
  • Ensure curly braces are correct
  • Try removing and re-typing the placeholder

Empty Value

Some placeholders may be empty in certain situations:

  • {roles.added.names} is empty if no roles were added
  • {server.description} is empty if no description is set
  • Design your messages to handle empty values gracefully

Unexpected Format

Date and time formats may vary based on system settings. Discord timestamps ({timestamp}) are the most reliable for consistent display.