Placeholders
Placeholders you can put in Cakey Bot messages, like {user.username} for the member's username.
Sign in to suggest an edit to this page.
Overview
Quick reminder: You must include the brackets { } when typing the placeholder so Cakey Bot knows to replace it with the correct values.
To find the ID of a user, channel or message, turn on Developer Mode in your Fluxer settings, then right-click it and pick Copy ID.
Basic Placeholders
User
{@username} - Mentions a specific user. Replace "username" with their username
<@userid> - Mentions a specific user. Replace "userid" with their user ID (More reliable)
{user.id} - The ID of the user
{user.nickname} - The user’s nickname
{user.username} - The user’s username
{user.globalname} - The user's globalname
{user.avatar}- The user’s avatar URL
{user.mention} - Mentions the user
{user.createdAt} - The user’s registration date
{user.joinedAt} - The user’s community join date
{user.timedoutuntil} - How long the user is timed out until
Channel
{channel} - The channel name where the command was used
{channel.id} - Channel ID
{channel.name} - Channel name
{channel.mention} - Channel mention
{#channel} - A channel mention. Replace "channel" with the name of the channel
<#channelid> - A channel mention. Replace "channelid" with the ID of the channel (More reliable)
{channel.isnsfw} - Whether the channel is flagged as NSFW or not
{channel.created} - The date and time the channel was created
{channel.position} - The position of the channel in the channel list
{channel.topic} - The topic of the channel
{channel.threadcount} - The number of threads under a channel
{channel.slowmodeinterval} - The slow mode interval on the channel
Thread
{thread.ownername} - The display name for the thread creator
{thread.ownermention} - A user mention for the thread creator
{thread.isprivate} - True/False if the thread is private or not
{thread.members} - The count for the number of members added to the thread
{thread.parentchannelname} - The name of the thread's parent channel
{thread.parentchannelid} - The ID of the thread's parent channel
<#{thread.parentchannelid}> - A channel mention for the thread's parent channel
Community
{server.id} - Community’s ID
{server.name} - Community’s name
{server.icon} - Community’s icon
{server.memberCount} - Number of members in the community (bots & humans)
{server.countbots} - Number of bots in the community
{server.counthumans} - Number of humans in the community
{server.ownerID} - Owner’s ID
{server.createdAt} - Community’s creation date
{server.ownername} - Owner’s Username
{server.splashurl} - Splash URL (if one is set)
{server.bannerurl} - Banner URL (if one is set)
{server.verificationlevel} - The community's verification/moderation level
{server.vanityurl} - Vanity URL code
{server.vanityurl} - Vanity URL code
{server.afkchannel} - AFK channel name
{server.afktimeout} - The AFK timeout (in seconds)
{server.countallchannels} - The number of channels in the community
{server.counttextchannels} - The number of text channels in the community
{server.countvoicechannels} - The number of voice channels in the community
{server.countemoji} - The number of emoji in the community
{server.countroles} - The number of roles in the community
{server.countstagechannels} - The number of stage channels in the community
{server.countcategories} - The number of category channels in the community
{server.countstickers} - The number of stickers in the community
{server.ruleschannel} - The current rules channel (community-enabled servers)
Role
{&role} - Mention a role by name. Replace "role" with the role name
<@&roleid> - Mention a role. Replace "roleid" with the role ID (More reliable)
Time & Date
{time} - Current 24 hour time
{time12} - Current 12 hour time
{date} - Current date
{datetime} - Current date with the 24 hour time
{datetime12} - Current date with the 12 hour time
Invite Tracking
Available in join, leave and ban announcements, their custom embeds and banners, when invite tracking is enabled. On a leave or ban they describe the invite the member originally joined with.
{inviter.mention} - Mentions the member who created the invite
{inviter.username} - The inviter's username
{inviter.name} - The inviter's nickname or display name
{inviter.id} - The inviter's ID
{inviter.avatar} - The inviter's avatar URL
{inviter.invites} - The inviter's total invites (regular - left - fake + bonus)
{inviter.regular} - The inviter's regular invites
{inviter.left} - How many of the inviter's invited members have left
{inviter.fake} - The inviter's fake invites
{inviter.bonus} - The inviter's bonus invites
{invite.code} - The invite code that was used
{invite.url} - The full invite link of that code
{invite.uses} - How many times the code has been used
{invite.maxuses} - The code's use limit, 0 when unlimited
{invite.label} - The label given to the code on the dashboard
{invite.source} - How the member arrived: Invite, Vanity, Bot or Unknown
{invite.isfake} - Whether the join counted as fake
{user.joincount} - How many times this member has joined the community
{user.isrejoin} - Whether the member has been in the community before
{user.stayduration} - How long the member was in the community, for leave and ban announcements
When the inviter cannot be worked out, for example a join through the vanity URL, the inviter and invite placeholders read "Unknown" and the counts read 0.
Community Statistics
Available in statistic channel names and the stats message when community statistics is enabled.
Each of these covers the last 30 days by default. Add :Nd to cover the last N days instead, from 1 up to 30: {messages:7d} is messages in the last 7 days, {messages:1d} in the last 24 hours, {top_chatter:14d} the most active member of the last two weeks. On free communities anything past 7 days is capped to 7.
{messages} - Messages sent in the last 30 days
{voice_hours} - Hours spent in voice in the last 30 days
{voice_minutes} - Minutes spent in voice in the last 30 days
{active_members} - Members who sent a message or joined voice in the last 30 days
{top_chatter} - The member who sent the most messages in the last 30 days
{top_voice} - The member who spent the most time in voice in the last 30 days
{joins} - Members who joined in the last 30 days (needs invite tracking)
{leaves} - Members who left in the last 30 days (needs invite tracking)
{time:FORMAT} - The current time in the community's timezone, for example {time:HH:mm}
Mentions
{@username} - Mentions a specific user. Replace "username" with their username
<@userid> - Mentions a specific user. Replace "userid" with their user ID (More reliable)
{user.mention} - Mentions the user
{channel.mention} - Channel mention
{#channel} - A channel mention. Replace "channel" with the name of the channel
<#channelid> - A channel mention. Replace "channelid" with the ID of the channel (More reliable)
{&role} - Mention a role by name. Replace "role" with the role name
<@&roleid> - Mention a role. Replace "roleid" with the role ID (More reliable)
{everyone} - Mentions @everyone
{noeveryone} - Disables @everyone (being able to mention everyone) in the command
{here} - Mentions @here
{nohere} - Disables @here (being able to mention everyone online with @here) in the command
{nomentions} - Disables ALL mentions in the command including @everyone, @here, role mentions & user mentions.
Message
{messagelink} - Displays a Fluxer message link/url to the original command/message that triggered the response
{quote:#channelid} - Quote the last message in the provided channel. Replace "channelid" with the ID of the channel
{reply} - Sends the response as a Fluxer "reply" to the message that triggered it.
Other
{random:min:max} - Generates a random number between the min/max. Replace "min" and "max" with a number between 0 and 999,999,999. Note: Your minimum number must be smaller than your maximum number.
{delay:0-60} - Delays the response for up to 60 seconds. Only the first delay placeholder in a response will work. If you exclude the delay placeholder then responses will be sent instantly.
Note: The delay placeholder only accepts a number, not a range of numbers. For example, if you wanted to do 35 seconds, you would use {delay:35} not {delay:0-35}.
Advanced Placeholders
Advanced Placeholders only work on "Auto Responders". They will not work on join/leave announcements, birthday messages, etc.
Delete
Note: Delete placeholders will not work while using DM placeholders on a command.
{delete} - Delete initial message the user sent after the response is sent.
{deleteafter:x} - Delete the response automatically after X amount of seconds. Replace the x with a number between 1 and 99.
{confirmdelete} - Add a trashcan button to the response that deletes the response when it is clicked.
These require Cakey Bot to have "Manage Message" permissions.
Add Tag/Remove Tag on Forums/Threads
These placeholders will only trigger for the initial post on a new thread. Existing threads will be unaffected.
{addtag:tag-name-here} - Adds a tag to the thread if it doesn't exist already.
{removetag:tag-name-here} - Removes a tag from the thread if it exists.
Forum/Thread Posts/Comments
{closethread} - Closes/archives the thread to prevent new replies/comments.
{lockthread} - Locks the thread so that only moderators can open/unlock it.
{deletethread} - Deletes the thread entirely.
Using the thread placeholders below will prevent the message from being triggered inside of ALL non-thread channels.
{originalpostonly} - Only trigger for the original post in a thread.
{commentsonly} - Only trigger for messages that are a comment inside of a thread.
Respond
{respond:#channel} - The channel that the command will send the response to. Replace "channel" with the channel ID. Limited to one channel per command.
DM
Cakey Bot can sometimes fail to send a DM if the user has their privacy settings set to block DMs from users in the community. This is NOT a bug and not something Cakey Bot can bypass.
{dm} - Direct message the bot response to the user who called the command. Limited to one DM per command.
{dm:@user} - Direct message the bot response to the specified user. Replace "user" with the user ID. Limited to one DM per command.
Examples:
{dm:@225182513465786369} //Specific user ID
Spamming commands that use this variable will lead to your community being blacklisted from using Auto Responders.
Cooldowns
Adds custom cooldowns for your responses. Note that the original anti-spam cooldown for the bot is still applied.
{cooldown-server:<seconds>}- Adds a cooldown for the entire community for the specified amount of seconds.{cooldown-channel:<seconds>}- Adds a cooldown per-channel for the specified amount of seconds.{cooldown-user:<seconds>}- Adds a cooldown per-user for the specified amount of seconds.
Response Chance
The response chance placeholder sets a percentage between 0% and 100% for the bot to respond or not respond to the trigger. Only the first chance placeholder is taken into account, any extras are ignored. You can see some examples below:
{chance:0} //0% chance to respond
{chance:35} //35% chance to respond
{chance:100} //100% chance to respond
(Note: You don't need {chance:100} to make the bot respond all the time, simply excluding any chance placeholder will act as 100%)
Link/URL Buttons
{linkbutton:(text)[url]} - Adds a link button to the message. Replace "text" with what you want the button to say and replace "url" with the link/url you want the button to open in the browser. There is a limit of 25 buttons per message/response and a max of 80 characters for the button text.
Examples:
{linkbutton:(Cakey Bot)[https://cakey.bot]}
{linkbutton:(Open Link)[https://google.com]}
{linkbutton:(Some Random Text)[https://youtube.com]}
Message Management
{createthread} - Creates a thread using the triggering message
{pinmessage} - Pins the triggering message
Note: When the channel has reached its limit of pinned messages, the pin is skipped.
User Role Management
Note: Cakey Bot must have access to manage roles & Cakey Bot's highest role must be above the role you are trying to grant/remove from the user. Cakey Bot's role must also be higher than the user's highest role.
{addrole:<id>} - Adds a role to the user.
{addtemprole:<id>:<hours>} - Adds a temporary role to the user for the specified amount of hours.
{removerole:<id>} - Removes the role from the user.
Examples:
{addrole:173439637388263425}
{addtemprole:173439637388263425:24}
Leveling/XP
{xp-add:<amount>} - Adds XP to the user.
{xp-remove:<amount>} - Removes XP from the user.
Examples:
{xp-add:5004}
Custom Achievements
{achievement-grant:<id>} - Grants the custom achievement to the user.
{achievement-revoke:<id>} - Revokes the custom achievement from the user.
Examples:
{achievement-grant:1337}
Note: You can only grant/revoke CUSTOM achievements. You can NOT grant/revoke progress-based achievements.
Economy
{user.balance} - Displays the user's current economy balance as a raw number. (No commas)
{user.balance-formatted} - Displays the user's current economy balance with a formatted number. (With commas)
{economy-add:<amount>} - Adds economy money to the user.
{economy-remove:<amount>} - Removes economy money from the user.
Moderation
Note that moderation placeholders will only work on Auto Responders and can NOT be used for Announcements.
- The maximum time for any temporary moderation action used in an Auto Responder is 27 days. Invalid times will be ignored or capped to 27 days.
- The time for temporary moderation actions must be formatted in a
5d6h2m7sformat. (You can include just the times you need, for example you could just do1d) - Any provided reason will be trimmed to 500 characters regardless of original length.
- You can include multiple punishment types on the same response, however, only the first punishment of each type will be applied.
- For example, if you include two warnings and a timeout on a response, the first warning and the timeout will be applied but the second warning will be ignored.
{warn:reason}
{timeout:reason:time}
{kick:reason}
{ban:reason}
{tempban:reason:time}
Reactions
Note: This placeholder will not work on messages that use {confirmdelete} or {dm}. Also, Cakey Bot can ONLY use Emoji from any community that Cakey Bot is in.
You can also add reactions to responses (up to 5). To add a reaction, include a reaction placeholder anywhere in the response string. Write a custom emoji as <:name:id>, or as <a:name:id> when it is animated. Unicode emoji are pasted as they are. Some placeholder examples are shown here:
{react:<a:200IQ:730769872698736692>} //Animated/Gif Emote
{react:<:r6s:847490914749382719>} //Custom Community Emote
{react:😄} //Normal Unicode Emote
You can also have reactions apply to the original message that triggered the auto responder by using the {reactoriginal} placeholders:
{reactoriginal:<a:200IQ:730769872698736692>} //Animated/Gif Emote
{reactoriginal:<:r6s:847490914749382719>} //Custom Community Emote
{reactoriginal:😄} //Normal Unicode Emote
Choose & Choice
The {choose:} and {choice} variables let you pick random items from a list or lists.
To set up a list, use {choose:item1;item2;item3}. You can have up to 20 lists, using {choose1:}, {choose2:}, and so on. There is no limit for the number of items in a list.
{choice} - Get a random value from your list.
{choice3} - Get a random value from list 3.
Examples:
{choose:pie;cake;icecream;}
{user.Username} likes {choice}
{choose1:apples;oranges;pears}
{choose2:dogs;cats;horses}
My favorite fruit is {choice1} and my favorite animal is {choice2}!
Math Expressions
The {math:X} placeholder lets you parse math expressions.
Example:
What is 5-2? It is: {math:5-2}!
Arguments/$N Variable
$N - Returns a command argument.
Examples:
Input: !slap Joe a big fish
Response: You slapped $1 with $2 $3+
Result: You slapped Joe with a big fish
$1 represents the first argument (Joe) in the command call.
$2 represents the second argument (a), and so on.
$3+ represents all the arguments after the first one in the command call (big fish) since Joe is the first argument.
Remember: Do not include this variable in the initial command/trigger. Place $1 $2 and so on only in the response field.