Variables
Every variable you can use in InviteCount's messages, cards and tickets, with examples.
Write a variable between braces, such as {member_mention}. The bot replaces it with its value when it sends the message. A variable the message doesn't support stays exactly as typed. See Embeds and variables for how the editor works.
Where each list works#
| Message | Variables |
|---|---|
| Join message, join DM | Server, member, inviter, invite, label, utility |
| Leave message | Server, member, inviter, label, utility (no invite variables) |
| Level-up message | Member (without {member_display_name}) and level |
| Verification panel (Premium) | Server and verification |
| Welcome banner, level card | Card variables |
| Ticket messages | Ticket variables |
| Giveaway messages | Giveaway variables |
Server#
| Variable | Shows | Example |
|---|---|---|
{guild_name} | Server name | Gaming Hub |
{guild_avatar} | Server icon link | https://cdn.discordapp.com/icons/… |
{guild_count} | Number of members | 1234 |
Member#
The member who joined, left or levelled up.
| Variable | Shows | Example |
|---|---|---|
{member_name} | Username | alex |
{member_display_name} | Server nickname, else display name, else username (not in level-up) | Alex ✨ |
{member_id} | Discord ID | 123456789012345678 |
{member_mention} | Mention (pings the member) | @Alex ✨ |
{member_avatar} | Avatar link | https://cdn.discordapp.com/avatars/… |
{member_created:R} | Account creation, relative | 3 years ago |
{member_created:F} | Account creation, long date and time | Wednesday, June 30, 2021 9:41 PM |
{member_created:f} | Account creation, short date and time | June 30, 2021 9:41 PM |
{member_created:d} | Account creation, short date | 06/30/2021 |
Dates are shown by Discord in each reader's language and time zone. They don't render in embed titles, authors or footers.
Inviter#
| Variable | Shows | Example |
|---|---|---|
{inviter_name} | Inviter's username | john |
{inviter_display_name} | Inviter's display name | John |
{inviter_id} | Inviter's ID | 987654321098765432 |
{inviter_mention} | Inviter's mention | @John |
{inviter_avatar} | Inviter's avatar link | https://cdn.discordapp.com/avatars/… |
{inviter_created:R}, :F, :f, :d | Inviter's account creation | 5 years ago |
{inviter_invites} | Inviter's total invites, after this join or leave | 42 |
{inviter_regular_invites} | Everything the inviter brought (credited, left, fake and bonus) | 57 |
{inviter_leave_invites} | Inviter's leaves | 5 |
{inviter_bonus_invites} | Inviter's bonus | 7 |
{inviter_fakes_invites} | Inviter's fakes | 3 |
Invite#
Join message and join DM only.
| Variable | Shows | Example |
|---|---|---|
{invite_code} | Code of the invite used | aBcD1234 |
{invite_uses} | Uses of that invite | 15 |
{invite_url} | Link of the invite | https://discord.gg/aBcD1234 |
Label#
| Variable | Shows | Example |
|---|---|---|
{invite_label} | The label of the link used; else Vanity link for the vanity link; else the invite code; else Unknown | Twitter bio |
Utility#
| Variable | Shows | Example |
|---|---|---|
{random_color} | A random colour | #800080 |
{random_letter} | A random letter | K |
Level-up#
| Variable | Shows | Example |
|---|---|---|
{level} | The level just reached | 5 |
{next_level} | Level + 1 | 6 |
{previous_level} | Level − 1 | 4 |
Plus the member variables, except {member_display_name}. Server, inviter and utility variables don't work here.
Verification panel#
The custom panel message (Premium) is the same for everyone, so it has no member variables.
| Variable | Shows | Example |
|---|---|---|
| Server variables | See Server | |
{verified_role} | Mention of the verified role (empty without one) | @Verified |
{verified_role_name} | Name of that role | Verified |
Join types#
Outside the Normal join type, there is no inviter and no invite. The variables then show placeholder values:
| Variable | Normal | Vanity, Bot, No permission, Unknown |
|---|---|---|
{inviter_name}, {inviter_display_name} | The inviter | unknown / Unknown |
{inviter_id}, {inviter_mention} | The inviter | 0, an unknown user |
{inviter_avatar} | The inviter's avatar | Discord's default avatar |
| Inviter counters | The inviter's counters | 0 |
{invite_code}, {invite_uses} | The invite | -1 |
{invite_url} | The invite link | https://discord.gg/-1 |
{invite_label} | The label, else the code | Vanity: its label or Vanity link. Others: Unknown |
An Unknown join through an invite without creator (server widget) keeps its real invite variables.
In test messages, you are the member and the bot is the inviter, with code -1 and counters at 0.
Card variables#
Used in the text layers of the card editor. Numbers have thousands separators.
Welcome banner: {member_name}, {member_display_name}, {member_id}, {guild_name}, {guild_count}, {inviter_name}, {inviter_display_name}, {inviter_invites}, {invite_code}, {invite_label}, and {guild_count_ordinal} (1,204th). Join type placeholders apply.
Level card:
| Variable | Shows | Example |
|---|---|---|
{member_name} | Username | alex |
{member_display_name} | Display name | Alex ✨ |
{guild_name} | Server name | Gaming Hub |
{level}, {next_level} | Current and next level | 12, 13 |
{rank} | Position in the server's level ranking | 4 |
{xp} | XP in the current level | 1,840 |
{next_xp} | XP needed for the next level | 2,500 |
{xp_left} | XP left to the next level | 660 |
{xp_percent} | Progress, 0 to 100 (no % sign) | 73 |
{total_xp} | Total XP | 25,310 |
{messages} | Messages counted | 3,412 |
{badges} | The member's InviteCount badges | 👑 Premium |
Giveaways#
The winners' announcement and the winners' DM, set in the giveaway settings.
| Variable | Shows | Example |
|---|---|---|
{prize} | The prize | Nitro |
{winners} | Mentions of every winner | @Alex, @John |
{winner} | In the DM, the winner who receives it; in the announcement, every winner | @Alex |
{winners_count} | Number of winners drawn | 2 |
{participants} | Number of participants | 1,200 |
{host} | Mention of the member who started the giveaway | @Mira |
{giveaway_link} | Link to the giveaway message | https://discord.com/channels/… |
{giveaway_channel} | Mention of its channel or thread | #giveaways |
{ended:R}, {ended:f} | When it ended, relative or date and time | 2 minutes ago |
{winner_roles} | Mentions of the roles given to the winners (empty without any) | @Winner |
{guild_name} | Server name | Gaming Hub |
Tickets#
Opening message, closing DM, escalation message and automation messages.
| Variable | Shows | Example |
|---|---|---|
{opener} | Mention of the member who opened the ticket | @Alex |
{opener_name} | Their display name | Alex |
{opener_id} | Their ID | 123456789012345678 |
{channel} | Mention of the ticket channel | #ticket-0042 |
{number} | Ticket number | 42 |
{template} | Template name (escalation: the target) | Support |
{panel} | Panel name (opening message only) | Help desk |
{support} | Mentions of the support roles | @Staff @Moderators |
{server} | Server name (also in panel messages) | Gaming Hub |
{answers} | Every form answer, question in bold | **Your issue?** I can't join |
{answer_1} … {answer_5} | One answer | I can't join |
Channel names (template pattern and /ticket rename): {counter}, {counter:04} (zero-padded: 0042), {username}, {user_id}, {template}, {claimer} (claimed name only). Names are lowercased, spaces become dashes, and other characters are removed.
Older names#
These names are no longer listed, but messages and cards that use them keep working:
| Older name | Use instead |
|---|---|
{member} | {member_name} ({member} also shows the #1234 tag that bot accounts still have) |
{inviter} | {inviter_name} (same note for bot accounts) |
{member_discriminator}, {inviter_discriminator} | Nothing: Discord retired tags, so they show 0 |
{server_name}, {server_avatar}, {server_count} | {guild_name}, {guild_avatar}, {guild_count} |