Resources

Variables

A complete reference of all dynamic placeholders available in greed.

Variables allow you to inject dynamic data into your messages and embeds. They are automatically replaced by the bot based on the current context.

All variables are case-sensitive. Most variables follow the category.property format.

Available in most contexts where a user or member is present (welcome messages, moderation, leveling, tickets, etc.).

VariableOutput
{user}Shortcut for the user's global username.
{user.id}The user's unique Discord ID.
{user.mention}Mentions the user (e.g., @adam).
{user.name}The user's global username.
{user.tag}The user's discriminator (e.g., 0001) or "0".
{user.display_name}Server nickname if set, otherwise global username.
{user.avatar}URL to the user's profile picture.
{user.display_avatar}URL to the user's profile picture.
{user.guild_avatar}URL to the user's server-specific avatar if set, otherwise "N/A".
{user.bot}Returns "Yes" or "No".
{user.created_at}Discord timestamp of account creation.
{user.created_at_timestamp}Raw UNIX timestamp of account creation.
{user.joined_at}Discord timestamp of server join (member context only).
{user.joined_at_timestamp}Raw UNIX timestamp of server join (member context only).
{user.boost}"Yes" if boosting the server, otherwise "No".
{user.boost_since}Discord timestamp of when boost started (or "N/A").
{user.premium_since}Discord timestamp of when premium started (or "N/A").
{user.boosting_since}Discord timestamp of when boosting started (or "N/A").
{user.boost_since_timestamp}Raw UNIX timestamp of boost start (or "N/A").
{user.premium_since_timestamp}Raw UNIX timestamp of premium start (or "N/A").
{user.boosting_since_timestamp}Raw UNIX timestamp of boosting start (or "N/A").
{user.role_list}Comma-separated list of role names.
{user.role_text_list}Comma-separated list of role mentions.
{user.top_role}The user's highest-position role name.
{user.color}Hex color of the user's top colored role (or "N/A").
{user.join_position}User's position in server join order (or "N/A").
{user.join_position_suffix}Join position with ordinal suffix, e.g., "5th" (or "N/A").

Conditionals

Use conditionals to include or exclude content based on variable values.

Syntax

{if condition}
  Content shown if true
{elseif other_condition}
  Content shown if other condition is true
{else}
  Fallback content
{/if}

Comparison Operators

  • == — Equals (case-insensitive)
  • != — Not equals (case-insensitive)

Examples

{if user.bot == Yes}This user is a bot{else}This user is not a bot{/if}
{if level.rank != ?}You ranked #{level.rank}{else}Rank unavailable{/if}

Falsy Values

The following values are treated as false in conditionals: "" (empty), "false", "no", "0", "none", "null".

{if description}Description: {description}{/if}

Unresolved Variables

If a variable doesn't exist in the current context, it will render as the literal variable name (with braces).

Example: If {tiktok.url} is used in a leveling message, it renders as {tiktok.url} since TikTok variables aren't available.

This allows templates to be reused across contexts — unused variables simply appear as-is rather than breaking the message.

Functional Variables

Lowercase

Convert any variable output to all lowercase letters.

  • Syntax: {lower(variable.name)}
  • Example: {lower(guild.name)} -> greed support

Target User

In moderation or interaction contexts, use target_user to refer to the person being acted upon. The target user has access to all the same properties as {user}.

  • Example: {target_user.name}, {target_user.mention}, {target_user.id}

Timestamp Formatting

Timestamps automatically render as Discord timestamps. You can customize the format using a style suffix:

  • {user.created_at:t} — Short time (e.g., 1:23 PM)
  • {user.created_at:T} — Long time (e.g., 1:23:45 PM)
  • {user.created_at:d} — Short date (e.g., 12/31/2022)
  • {user.created_at:D} — Long date (e.g., December 31, 2022)
  • {user.created_at:f} — Short date-time (e.g., December 31, 2022 1:23 PM)
  • {user.created_at:F} — Long date-time (e.g., Saturday, December 31, 2022 1:23 PM)
  • {user.created_at:R} — Relative time (e.g., "2 hours ago")

Feature-specific variables are only available in their corresponding context. Using a TikTok variable in a leveling message will render the variable name as-is. Make sure your template uses variables appropriate to the feature you're configuring.