Placeholders/Variables

Quick reminder: You must include the brackets { } when typing the placeholder so Cakey Bot knows to replace it with the correct values.

Example usage of placeholders

Don't know how to find role/channel/user IDs? You can use this extremely detailed and easy to follow guide here written by Discord.

Basic Placeholders

User

{@user} - Mentions a specific user. Replace "user" with their username {user.id} - The ID of the user {user.nick} - The user’s nickname excluding the discriminator {user.nickname} - The user’s nickname including the discriminator {user} - The username of the user excluding the discriminator {user.username} - The user’s username including the discriminator {user.discriminator} - The user’s discriminator {user.avatar}- The user’s avatar URL {user.mention} - Mentions the user {user.createdAt} - The user’s registration date {user.joinedAt} - The user’s guild join date

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 you want to mention

Guild

{server.id} - Server’s ID {server.name} - Server’s name {server.icon} - Server’s icon {server.memberCount} - Number of members in the server {server.ownerID} - Owner’s ID {server.createdAt} - Server’s creation date {server.region} - Server’s region {server.ownername} - Owner’s Username {server.splashurl} - Splash URL (if one is set) {server.bannerurl} - Banner URL (if one is set) {server.verificationlevel} - The server's verification/moderation level {server.vanityurl} - Vanity URL code {server.boostlevel} - Boosted tier level {server.boostcount} - The number of boosts the server has {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 server {server.counttextchannels} - The number of text channels in the server {server.countvoicechannels} - The number of voice channels in the server {server.countemoji} - The number of emoji in the server {server.countroles} - The number of roles in the server

Role

{&role} - Mention a role by name. Replace "role" with the role name

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

Currently, all times & dates are for the United States Eastern timezone. In the future, you will be able to select your timezone per-guild.

Other

{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. {prefix} - Show command prefix for the server

Advanced Placeholders

Advanced Placeholders only work on "Auto Responder" and "Custom Commands". They will not work on join/leave/ban announcements.

Delete

{delete} - Delete command the player sent after its sent {deleteafter:x} - Delete the response after X amount of seconds. Replace the x with a number between 1 and 9. {confirmdelete} - Add a trashcan reaction to the response that deletes it after it is clicked. (Similar to AFK messages)

These require Cakey Bot to have "Manage Message" permissions. {confirmdelete} also requires Cakey Bot to have access to add reactions to messages.

Require

{require:&role} - Set the required role to use the command. Replace "role" with the role ID. {require:#channel} - Set the required channel that the command can be run in. Replace "channel" with the channel ID. {require:@user} - Set the specific user who can use this command. Replace "user" with the user ID.

Examples:

{require:&237273200055156736} //Specific role ID
{require:#225182513465786369} //Specific channel ID
{require:@225182513465786369} //Specific user ID

Not

{not:&role} - Blacklist a specific role from using the command. Replace "role" with the role ID. {not:#channel} - Blacklist the command from being run in a specific channel. Replace "channel" with the channel ID. {not:@user} - Blacklist a specific user from using the command. Replace "user" with the user ID.

Examples:

{not:&237273200055156736} //Specific role ID
{not:#225182513465786369} //Specific channel ID
{not:@225182513465786369} //Specific user ID

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

In order to decrease the chances to abuse this placeholder, it is a Premium Only placeholder.

Note: Delete placeholders will not work while using DM placeholders on a command.

{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 guild being blacklisted from using Custom Commands.

Choose & Choice

This placeholder is planned and is not currently implemented in the public version of Cakey Bot. Check back later for more information.

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 10 lists, using {choose1:}, {choose2:}, and so on. You can have up to 10 items per 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}!

$N Variable

This placeholder is planned and is not currently implemented in the public version of Cakey Bot. Check back later for more information.

$N - Returns a command argument.

Examples:

Input: !slap Joe a fish
Response: You slapped $1 with $2+
Result: You slapped Joe with a fish
$1 represents the first argument Joe in the command call, $2 represents the second argument, and so on.
$2+ represents all the arguments after the first one in the command call a fish since Joe is the first argument