Resources | Scripting
Variables
A complete reference of all dynamic placeholders available in greed.
Type / in Discord to find the slash version of a command. Prefix commands keep working until March 5, 2027. What is changing
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.).
| Variable | Output |
|---|---|
{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"). |
Available in most contexts where guild information is present.
| Variable | Output |
|---|---|
{guild} | The name of the server. |
{guild.id} | The server's unique ID. |
{guild.name} | The name of the server. |
{guild.count} | Total member count (formatted with comma separators). |
{guild.member_count} | Total member count (formatted with comma separators). |
{guild.icon} | URL to the server's icon (or "N/A"). |
{guild.banner} | URL to the server's banner (or "N/A"). |
{guild.splash} | URL to the server's splash (or "N/A"). |
{guild.owner_id} | Discord ID of the server owner. |
{guild.boost_count} | Total number of server boosts. |
{guild.boost_tier} | Current boost level (0-3, or "No Level"). |
{guild.created_at} | Discord timestamp of server creation. |
{guild.created_at_timestamp} | Raw UNIX timestamp of server creation. |
{guild.role_count} | Total number of roles in the server. |
{guild.emoji_count} | Total number of custom emojis. |
{guild.text_channels_count} | Total text channels. |
{guild.voice_channels_count} | Total voice channels. |
{guild.category_channels_count} | Total category channels. |
{guild.channels_count} | Total channels. |
{guild.text_channels} | Comma-separated list of text channel names. |
{guild.voice_channels} | Comma-separated list of voice channel names. |
{guild.category_channels} | Comma-separated list of category names. |
{guild.channels} | Comma-separated list of all channel names. |
{guild.afk_channel} | Mention of the AFK channel (or "N/A"). |
{guild.afk_timeout} | AFK timeout in seconds. |
{guild.preferred_locale} | Server's preferred language. |
{guild.key_features} | Server features as comma-separated list (or "N/A"). |
{guild.max_presences} | Max presences (or "N/A"). |
{guild.max_members} | Max members (or "N/A"). |
{guild.max_users} | Max users (or "N/A"). |
{guild.max_video_channel_users} | Max video channel users (or "N/A"). |
{guild.region} | Server region (currently "N/A"). |
{guild.shard} | Shard ID this server is on. |
Available in contexts where channel information is present.
| Variable | Output |
|---|---|
{channel} | The name of the channel. |
{channel.id} | The current channel's ID. |
{channel.mention} | Mentions the channel (e.g., #general). |
{channel.name} | The name of the channel. |
{channel.topic} | The channel's topic/description (or "N/A"). |
{channel.category_id} | ID of the parent category (or "N/A"). |
{channel.type} | Channel type number. |
{channel.position} | Channel position in the channel list (or "N/A"). |
{channel.slowmode_delay} | Slowmode delay in seconds (0 if disabled). |
Available when role information is present in the context.
| Variable | Output |
|---|---|
{role} | The name of the role. |
{role.id} | The role's unique ID. |
{role.name} | The name of the role. |
{role.mention} | Mentions the role (e.g., @moderator). |
{role.color} | Hex color of the role (e.g., #FF0000) or "N/A". |
{role.position} | Position of the role in the hierarchy. |
These variables are available in TikTok feed custom message templates. Available in TikTok feed contexts only.
| Variable | Output |
|---|---|
{tiktok.url} | Direct link to the TikTok post. |
{tiktok.caption} | The post caption text. |
{tiktok.id} | The post's TikTok ID. |
{tiktok.created} | Relative timestamp of when post was created (e.g., "2 hours ago"). |
{tiktok.likes} | Compact formatted like count (e.g., "1.2K"). |
{tiktok.comments} | Compact formatted comment count. |
{tiktok.plays} | Compact formatted play count. |
{tiktok.shares} | Compact formatted share count. |
{tiktok.type} | Post type: "photo" or "video". |
{tiktok.creator} | Creator's TikTok handle/username. |
{tiktok.creator.name} | Creator's display name. |
{tiktok.creator.url} | Direct link to creator's TikTok profile. |
{tiktok.creator.avatar} | URL to creator's profile picture. |
These variables are available in Twitch stream notification templates. Available in Twitch live alert contexts only.
| Variable | Output |
|---|---|
{twitch.url} | Direct link to the Twitch stream. |
{twitch.title} | Stream title. |
{twitch.category} | Game/category being streamed. |
{twitch.game} | Alias for {twitch.category} (same value). |
{twitch.viewers} | Current viewer count (formatted). |
{twitch.started} | Relative timestamp of stream start (e.g., "1 hour ago"). |
{twitch.thumbnail} | URL to the stream thumbnail. |
{twitch.id} | The stream's Twitch ID. |
{twitch.creator} | Streamer's login name. |
{twitch.creator.name} | Streamer's display name. |
{twitch.creator.url} | Direct link to streamer's Twitch channel. |
These variables are available in YouTube notification templates. Used for both video uploads (including Shorts) and live streams. Some fields are only populated in specific contexts.
| Variable | Output | Context |
|---|---|---|
{youtube.url} | Direct link to the video or live stream. | All |
{youtube.title} | Video/stream title. | All |
{youtube.description} | Video description (empty for live streams). | Uploads |
{youtube.id} | The video's YouTube ID. | All |
{youtube.thumbnail} | URL to the thumbnail (empty for some live streams). | All |
{youtube.published} | Relative timestamp of upload (e.g., "30 minutes ago"). Empty for live streams. | Uploads |
{youtube.type} | "video" for regular videos, "short" for YouTube Shorts, "live" for livestreams. | All |
{youtube.viewers} | Current viewer count (formatted). Only for live streams. | Live |
{youtube.creator} | Channel name (creator). | All |
{youtube.creator.url} | Direct link to the creator's channel. | All |
These variables are available in Instagram feed custom message templates. Available in Instagram feed contexts only.
| Variable | Output |
|---|---|
{instagram.url} | Direct link to the post. |
{instagram.caption} | The post caption text. |
{instagram.id} | The post's shortcode. |
{instagram.created} | Relative timestamp of when the post was published. |
{instagram.likes} | Compact formatted like count (e.g., "1.2K"). |
{instagram.comments} | Compact formatted comment count. |
{instagram.type} | Post type: "image", "video" or "carousel". |
{instagram.media} | URL of the first image or video in the post. |
{instagram.creator} | Account username. |
{instagram.creator.url} | Direct link to the account's profile. |
{instagram.creator.avatar} | URL to the account's profile picture. |
These variables are available in X (Twitter) feed custom message templates. One template covers posts, self-replies and reposts: use {x.type} to tell them apart.
| Variable | Output |
|---|---|
{x.url} | Direct link to the post. |
{x.text} | The post text. |
{x.id} | The post's ID. |
{x.media} | URL of the first image or video thumbnail, if the post has media. |
{x.published} | Relative timestamp of when the post went up. |
{x.type} | "post", "repost" or "reply". |
{x.likes} | Like count with comma grouping (e.g., "27,325"). |
{x.reposts} | Repost count with comma grouping. |
{x.replies} | Reply count with comma grouping. |
{x.creator} | Account display name. |
{x.creator.handle} | Account handle, without the @. |
{x.creator.url} | Direct link to the account's profile. |
{x.creator.avatar} | URL to the account's profile picture. |
{x.creator.verified} | "true" when the account is verified, otherwise "false". |
These variables are available in Pinterest feed custom message templates, whether the feed follows one board or every board.
| Variable | Output |
|---|---|
{pinterest.url} | Direct link to the pin. |
{pinterest.title} | The pin's description text. |
{pinterest.id} | The pin's ID. |
{pinterest.image} | URL of the pin image. |
{pinterest.published} | Relative timestamp of when the pin was saved. |
{pinterest.creator} | Account display name. |
{pinterest.creator.handle} | Account username. |
{pinterest.creator.url} | Direct link to the account's profile. |
These variables are available in SoundCloud feed custom message templates. Available in SoundCloud feed contexts only.
| Variable | Output |
|---|---|
{soundcloud.url} | Direct link to the track. |
{soundcloud.title} | Track title. |
{soundcloud.description} | Track description, flattened to one line. |
{soundcloud.id} | The track's ID. |
{soundcloud.artwork} | URL to the cover artwork. |
{soundcloud.duration} | Track length, e.g., "3:42" or "1:02:05". |
{soundcloud.plays} | Play count with comma grouping. |
{soundcloud.likes} | Like count with comma grouping. |
{soundcloud.published} | Relative timestamp of the upload. |
{soundcloud.creator} | Artist display name. |
{soundcloud.creator.handle} | Artist profile name. |
{soundcloud.creator.url} | Direct link to the artist's profile. |
These variables are available in Kick live alert templates. Available in Kick alert contexts only.
| Variable | Output |
|---|---|
{kick.url} | Direct link to the stream. |
{kick.title} | Stream title. |
{kick.category} | Category being streamed. |
{kick.viewers} | Current viewer count with comma grouping. |
{kick.started} | Relative timestamp of the broadcast start. |
{kick.thumbnail} | URL to the stream thumbnail. |
{kick.language} | Stream language code, e.g., "en". |
{kick.creator} | Channel name, lowercase. |
{kick.creator.name} | Channel display name. |
{kick.creator.url} | Direct link to the channel (same as {kick.url}). |
These variables are available in custom giveaway embed templates. Available in giveaway contexts only.
| Variable | Output |
|---|---|
{prize} | The giveaway prize name. |
{description} | The giveaway description (or empty). |
{winners} | Number of winners. |
{entries} | Current number of entries. |
{host} | Mention of the giveaway host (or empty). |
{host.id} | ID of the giveaway host (or empty). |
{ends} | Relative timestamp when giveaway ends (e.g., "in 2 days"). |
{ends.long} | Long timestamp of when giveaway ends. |
{ends.timestamp} | Raw UNIX timestamp of when giveaway ends. |
{required_role} | Mention of required role if set (or empty). |
{min_level} | Minimum level requirement. |
{max_level} | Maximum level requirement. |
These variables are available in Last.fm custom embed commands and now playing displays.
| Variable | Output |
|---|---|
{track} | Shortcut for current track name. |
{track.name} | Title of the current track. |
{track.url} | Last.fm link to the track. |
{track.hyperlink} | Clickable Markdown link for the track. |
{track.plays} | Your scrobbles for this specific track. |
{track.image} | URL to the track artwork (or empty). |
{track.spotify_url} | Spotify search link for the track. |
{artist} | Shortcut for artist name. |
{artist.name} | Name of the artist. |
{artist.url} | Last.fm link to the artist page. |
{artist.hyperlink} | Clickable Markdown link to the artist. |
{album} | Shortcut for album name. |
{album.name} | Title of the album. |
{album.url} | Last.fm link to the album. |
{album.cover} | URL to the album artwork (or empty). |
{user.scrobbles} | Your total Last.fm scrobbles. |
{scrobbles} | Alias for {user.scrobbles}. |
{user.name} | Your Last.fm username. |
{user.avatar} | Your Last.fm avatar (currently empty). |
These variables are available in level-up award message templates.
| Variable | Output |
|---|---|
{level} | The user's new level. |
{level.current} | The user's new level. |
{level.next} | The next level (current + 1). |
{level.rank} | User's rank among server members (or "?" if unavailable). |
{level.xp} | Total XP the user has accumulated. |
{level.next_xp} | XP needed to reach the next level. |
These variables are available in AFK status notification templates when someone mentions an AFK user.
| Variable | Output |
|---|---|
{message} | The AFK status message set by the user. |
{status} | Alias for {message}. |
{time} | How long the user has been AFK (e.g., "2 hours and 30 minutes"). |
{mentioner.name} | Display name of the person who mentioned the AFK user. |
{mentioner.mention} | Mention of the person who triggered the AFK notification. |
These variables are available in custom moderation action messages (warns, bans, mutes, etc.).
| Variable | Output |
|---|---|
{reason} | The reason provided for the moderation action. |
{moderator} | Full name of the moderator who performed the action. |
{moderator.name} | Username of the moderator. |
{moderator.id} | Discord ID of the moderator. |
{moderator.mention} | Mention of the moderator. |
{duration_seconds} | Duration in seconds (if applicable, e.g., for mutes). |
{duration_minutes} | Duration in minutes. |
{duration_hours} | Duration in hours. |
{duration_days} | Duration in days. |
{time} | Human-readable duration (e.g., "2 hours and 30 minutes"). |
{history} | Number of prior actions this user has received (if tracked). |
{warning_count} | Number of warnings the user has. |
These variables are available in ticket-related messages (open, close, claim, etc.).
| Variable | Output |
|---|---|
{ticket.case} | The ticket's case/reference number. |
{ticket.channel.mention} | Mention of the ticket channel. |
{ticket.channel.name} | Name of the ticket channel. |
{ticket.option.label} | Selected topic/category for the ticket. |
{ticket.opened_at.short} | Timestamp when ticket was opened (short format). |
{ticket.author.mention} | Mention of the ticket creator. |
{ticket.author.*} | Any user property for the ticket creator (e.g., {ticket.author.name}). |
{ticket.claimer.mention} | Mention of who claimed the ticket (if claimed). |
{ticket.claimer.*} | Any user property for the claimer (if applicable). |
{ticket.closer.mention} | Mention of who closed the ticket (if closed). |
{ticket.closer.*} | Any user property for the closer (if applicable). |
{ticket.reopener.mention} | Mention of who reopened the ticket (if reopened). |
{ticket.reopener.*} | Any user property for the reopener (if applicable). |
{form.FIELD_KEY} | Custom form responses (replaced with the answer to that field). |
These are available in the thank-you message for vanity and server tag rewards, alongside the full user and server variable sets.
| Variable | Output |
|---|---|
{vanity} | The pattern the member matched in their custom status. |
{badge} | Reserved for the equipped server tag. Discord does not expose the tag text, so this renders empty. |
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.