Keywords

$name

Message Receive, Private Message, Member Join, Reaction Add

Inserts a mention of the user who called the command.

$avatar

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the avatar URL of the user who called the command.

$defaultAvatar

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the default avatar URL of the user who called the command.

$namePlain

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the plain text username of the user who called the command.

$discriminator

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the discriminator (the numbers after the #) of the user who called the command.

$tag

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the tag (in the form Username#1234) of the user who called the command.

$ID

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the unique ID number of the user who called the command.

$serversSharedWithBot

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the number of servers shared with the bot the user who called the command has.

$timeCreated

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the account creation time of the user who called the command.

$isBot

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns "true" or "false" indicating whether the user who called the command is a bot.

$globalName

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the global display name of the user who called the command.

$memberIsOwner

Message Receive

Is the member of the event the owner of the server.

$memberEffectiveName

Message Receive

This is the name the member goes by within the server.

$memberEffectiveAvatar

Message Receive

This is the avatar that the user has displayed within this specific server.

$memberID

Message Receive

The unique ID of the member.

$memberHasTimeJoined

Message Receive

Gives "true" or "false" denoting whether the user has a time they joined the server.

$memberTimeJoined

Message Receive

The time the member joined the server.

$memberHasBoosted

Message Receive

Has this member boosted the server?. Returns "true" or "false".

$memberTimeBoosted

Message Receive

What is the time the user boosted the server? If there is none we will get "null".

$memberNickname

Message Receive

Inserts the member's server nickname, if one is set.

$memberEffectiveTag

Message Receive

Inserts the tag (in the form Username#1234) of the member.

$memberEffectiveID

Message Receive

Inserts the unique ID of the member's underlying user account.

$memberEffectiveTimeCreated

Message Receive

Inserts the account creation time of the member's underlying user account.

$memberColor

Message Receive

Inserts the hex color code of the member's display color in the server.

$memberRoles

Message Receive

Inserts a comma-separated list of the member's role names in the server.

$memberRoleCount

Message Receive

Inserts the number of roles the member has in the server.

$mentionedName

Message Receive

Inserts a mention of the user mentioned in the call of the command.

$mentionedAvatar

Message Receive

Inserts the avatar URL of the user mentioned in the call of the command.

$mentionedDefaultAvatar

Message Receive

Inserts the default avatar URL of the user mentioned in the call of the command.

$mentionedNamePlain

Message Receive

Inserts the plain text username of the user mentioned in the call of the command.

$mentionedDiscriminator

Message Receive

Inserts the discriminator (the numbers after the #) of the user mentioned in the call of the command.

$mentionedTag

Message Receive

Inserts the tag (in the form Username#1234) of the user mentioned in the call of the command.

$mentionedID

Message Receive

Inserts the unique ID number of the user mentioned in the call of the command.

$mentionedServersSharedWithBot

Message Receive

Inserts the number of servers shared with the bot the user mentioned in the call of the command.

$mentionedTimeCreated

Message Receive

Inserts the account creation time of the user mentioned in the call of the command.

$mentionedIsBot

Message Receive

Returns "true" or "false" indicating whether the mentioned user is a bot.

$mentionedGlobalName

Message Receive

Inserts the global display name of the user mentioned in the call of the command.

$botName

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts a mention of your bot.

$botAvatar

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the avatar URL of your bot.

$botDefaultAvatar

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the default avatar URL of your bot.

$botNamePlain

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the plain text username of your bot.

$botDiscriminator

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the discriminator (the numbers after the #) of your bot.

$botTag

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the tag (in the form Username#1234) of your bot.

$botID

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the unique ID number of your bot.

$botTimeCreated

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the account creation time of your bot.

$server

Message Receive, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the name of the server where the command was called.

$serverCount

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the number of the servers the bot is in.

$memberCount

Message Receive, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the number of users in the server where the command was called.

$allMemberCount

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the number of users in all server where the bot is.

$serverIcon

Message Receive, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the URL of the icon of the server where the command was called.

$serverBanner

Message Receive, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the URL of the server banner of the server where the command was called.

$serverDescription

Message Receive, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the description of the server where the command was called.

$serverSplash

Message Receive, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the URL of the splash of the server where the command was called.

$serverCreateTime

Message Receive, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the creation time of the server where the command was called.

$serverID

Message Receive, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the unique ID of the server where the command was called.

$serverOwner

Message Receive, Member Join, Member Leave, Member Ban, Reaction Add

Inserts a mention of the server owner.

$serverOwnerPlain

Message Receive, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the plain text display name of the server owner.

$serverBoostCount

Message Receive, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the number of boosts the server has.

$serverBoostTier

Message Receive, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the boost tier level of the server (0, 1, 2, or 3).

$serverVanityCode

Message Receive, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the vanity invite code of the server, if one exists.

$channel

Message Receive, Private Message, Reaction Add

Inserts the name of the channel where the message was sent.

$channelID

Message Receive, Reaction Add

Inserts the ID of the channel where the message was sent.

$channelCreateDate

Message Receive, Reaction Add

Inserts the time of creation of the channel where the message was sent.

$channelAsMention

Message Receive, Reaction Add

Inserts the mention of the channel where the message was sent.

$channelTopic

Message Receive, Reaction Add

Inserts the topic of the channel where the message was sent.

$channelIsNSFW

Message Receive, Reaction Add

Returns "true" or "false" indicating whether the channel is marked as NSFW.

$createChannel(name, type)

Message Receive, Reaction Add

Creates a new channel with the given name and type. Type defaults to "text". Valid types: text, voice, category, announcement, stage, forum. Returns the new channel's ID.

$createChannelIn(name, type, categoryID)

Message Receive, Reaction Add

Creates a new channel under a specific category. Returns the new channel's ID.

$cloneChannel(channelID)

Message Receive, Reaction Add

Clones an existing channel, copying all its properties including permissions. Returns the new channel's ID.

$deleteChannel(channelID, reason)

Message Receive, Reaction Add

Deletes a channel by its ID. The reason is optional and appears in the audit log. Returns "true" on success.

$setChannelName(channelID, name)

Message Receive, Reaction Add

Renames a channel. Returns "true" on success.

$setChannelTopic(channelID, topic)

Message Receive, Reaction Add

Sets the topic of a text channel. Returns "true" on success.

$setChannelNSFW(channelID, true/false)

Message Receive, Reaction Add

Toggles the NSFW flag on a channel. Returns "true" on success.

$setChannelSlowmode(channelID, seconds)

Message Receive, Reaction Add

Sets the slowmode delay on a channel in seconds (0-21600). Use 0 to disable. Returns "true" on success.

$setChannelPosition(channelID, position)

Message Receive, Reaction Add

Sets the position of a channel in the channel list. Returns "true" on success.

$setChannelParent(channelID, categoryID)

Message Receive, Reaction Add

Moves a channel to a category. Use an empty category ID to remove it from its current category. Returns "true" on success.

$findChannel(name)

Message Receive, Reaction Add

Finds a channel by name (case-insensitive). Returns the channel ID, or empty if not found.

$getChannelName(channelID)

Message Receive, Reaction Add

Gets a channel's name by its ID. Returns empty if the channel is not found.

$getChannelType(channelID)

Message Receive, Reaction Add

Gets a channel's type as a friendly string (text, voice, category, announcement, stage, forum).

$getChannelParent(channelID)

Message Receive, Reaction Add

Gets the parent category ID of a channel. Returns empty if the channel has no parent category.

$channelCount

Message Receive, Reaction Add

Inserts the total number of channels in the server.

$listChannels(type)

Message Receive, Reaction Add

Lists all channel names as a comma-separated string. Optionally filter by type (text, voice, category, etc.).

$listChannelIDs(type)

Message Receive, Reaction Add

Lists all channel IDs as a comma-separated string. Optionally filter by type.

$lockChannel(channelID, roleID)

Message Receive, Reaction Add

Denies the Send Messages permission for a role in a channel. Defaults to @everyone if no role ID is provided. Returns "true" on success.

$unlockChannel(channelID, roleID)

Message Receive, Reaction Add

Resets the Send Messages permission for a role in a channel (inherits from server). Defaults to @everyone if no role ID is provided. Returns "true" on success.

$channelMention(channelID)

Message Receive, Reaction Add

Formats a channel ID as a clickable channel mention.

$message

Message Receive, Private Message

Inserts the whole message of the called command.

$messageAfterCommand

Message Receive, Private Message

Inserts the message after the command part of the called command.

$args(index)

Message Receive, Private Message

Inserts a specific argument from the message by its index (0-based).

$argsCount

Message Receive, Private Message

Inserts the number of arguments in the message.

$option(name)

Interaction Commands

Inserts the value of a slash command option by its name.

$eval

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Used to mark the start of a js code block. Must be followed by a $halt statement after the code is finished

$halt

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Used to mark the end of a js code block.

$get(name)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the value of the js variable with that name.

$set(name,value)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Used to set a js variable. Supports boolean "true" and "false" as well as numbers and strings.

$upper(text)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Converts the given text to uppercase.

$lower(text)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Converts the given text to lowercase.

$length(text)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns the number of characters in the given text.

$replace(text,find,replacement)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Replaces all occurrences of "find" with "replacement" in the given text.

$substring(text,start,end)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Extracts a portion of the text from the start index to the end index (0-based).

$trim(text)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Removes whitespace from the beginning and end of the given text.

$repeat(text,count)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Repeats the given text a specified number of times (max 100).

$contains(text,search)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns "true" if the text contains the search string, "false" otherwise. Case-sensitive.

$startsWith(text,prefix)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns "true" if the text starts with the given prefix, "false" otherwise. Case-sensitive.

$endsWith(text,suffix)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns "true" if the text ends with the given suffix, "false" otherwise. Case-sensitive.

$sub(a,b)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Subtracts b from a and returns the result.

$mul(n1,n2,...)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Multiplies all given numbers together and returns the result.

$div(a,b)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Divides a by b and returns the result. Returns an error if b is zero.

$mod(a,b)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns the remainder of dividing a by b. Returns an error if b is zero.

$round(n,decimals)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Rounds n to the nearest integer, or to the specified number of decimal places if provided.

$floor(n)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Rounds n down to the nearest integer.

$ceil(n)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Rounds n up to the nearest integer.

$abs(n)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns the absolute value of n.

$toFixed(n,decimals)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Formats n to a fixed number of decimal places (default 2, max 20).

$min(n1,n2,...)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns the smallest value from the given numbers.

$max(n1,n2,...)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns the largest value from the given numbers.

$clamp(n,min,max)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Clamps n so that it is no less than min and no greater than max.

$pow(base,exp)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns base raised to the power of exp.

$sqrt(n)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns the square root of n. Returns an error if n is negative.

$log(n)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns the natural logarithm of n. Returns an error if n is zero or negative.

$pi

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns the value of pi (3.141592653589793).

$isNumber(text)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Returns "true" if the text is a valid number, "false" otherwise.

$if(condition)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Starts a conditional block. The content between $if and $endif (or $else/$elseif) is only included if the condition is true. Conditions support operators: == (equals), != (not equals), > < >= <= (numeric comparison), & (and), | (or), ! (not), and () for grouping. A value is considered true if it is not empty, not "false", and not "0".

$elseif(condition)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Adds an alternative branch to an $if block. If the previous condition was false, this condition is checked. You can chain multiple $elseif blocks.

$else

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Adds a fallback branch to an $if block. The content after $else is used when all previous conditions were false.

$endif

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Ends an $if block. Every $if must have a matching $endif.

$date

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the current date.

$hour

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the current hour.

$minute

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the current minute.

$second

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the current second.

$random{a|b|c}

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts a randomly selected string from the arguments located in the brackets {}. Strings must be separated using |.

$sum{1|2|3}

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the sum of its arguments located in the brackets {}. Numbers must be separated using |.

$commandCount

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the amount of commands the bot has.

$rollnum(min,max)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts a random number between min and max inclusive.

$ping

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts the gateway ping.

$inviteURL

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts URL to invite the bot to a server.

$setStatus{online|playing|Activity text}

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Sets the bot status from a command. The first parameter is online, idle, or dnd. The second is watching, playing, listening, competing, or reset. The third is the activity text and is limited to 128 characters.

$randomInt

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts a random integer between 0 and 99.

$randomFloat

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts a random decimal number between 0 and 1.

$randomBoolean

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Inserts a random "true" or "false" value.

$chat(prompt)

Message Receive, Private Message, Member Join, Member Leave, Member Ban, Reaction Add

Sends the given prompt to an AI and inserts the response.

Discord Timestamp Keywords

Current BCFD interpreter; availability follows the corresponding base value

These variants return Discord timestamp markup so Discord renders a localized date and time.

$timeCreatedDiscord - caller account creation time.

$memberTimeJoinedDiscord - caller's server join time.

$memberEffectiveTimeCreatedDiscord - caller's underlying account creation time.

$memberTimeBoostedDiscord - time the caller began boosting.

$botTimeCreatedDiscord - bot account creation time.

$serverCreateTimeDiscord - server creation time.

$channelCreateDateDiscord - current channel creation time.

$mentionedTimeCreatedDiscord - mentioned user's account creation time.

$dateDiscord - current date and time.

If the required user, member, server, or channel context is unavailable, the result is empty.

Mentioned Member Context

Message Receive commands with a mentioned server member

These values describe the mentioned user's membership in the current server. They return an empty value when no mentioned member is available.

$mentionedMemberIsOwner - whether the member owns the server.

$mentionedMemberEffectiveName, $mentionedMemberNickname, and $mentionedMemberID - server display name, nickname, and member ID.

$mentionedMemberHasTimeJoined, $mentionedMemberTimeJoined, and $mentionedMemberTimeJoinedDiscord - join-time availability and values.

$mentionedMemberEffectiveAvatar, $mentionedMemberEffectiveTag, $mentionedMemberEffectiveID, $mentionedMemberEffectiveTimeCreated, $mentionedMemberEffectiveTimeCreatedDiscord, and $mentionedMemberEffectiveDefaultAvatar - underlying account information.

$mentionedMemberTimeBoosted, $mentionedMemberTimeBoostedDiscord, and $mentionedMemberHasBoosted - server boost information.

$mentionedMemberColor, $mentionedMemberRoles, and $mentionedMemberRoleCount - display color and role information.

Expanded Utility and Time Keywords

Current BCFD interpreter

$wordCount(text) counts whitespace-separated words. $cropText(text,length,suffix) crops Unicode text and appends an optional suffix only when cropping occurs. $linesCount(text) counts lines. $toTitleCase(text) capitalizes words. $numberSeparator(integer,separator) groups integer digits, using a comma by default.

$isBoolean(value) accepts only true or false, case-insensitively. $isInteger(value) and $isValidHex(value) validate signed base-10 integers and six-digit hexadecimal colors. $randomString(length) returns 0-10 random letters and digits.

$calculate(expression) safely evaluates numbers, parentheses, unary signs, +, -, *, /, %, and **. It does not execute JavaScript and rejects division by zero, excessive input, and excessive nesting.

$day, $month, and $year return current local date components. $getTimestamp(unit) returns Unix time in seconds (s, the default), milliseconds (ms), or nanoseconds (ns).

Role Keywords

Server commands; mutations require Manage Roles

Role lookup accepts a numeric ID, a role mention, or a case-insensitive name. $roleCount, $roleExists(role), $findRole(role), $roleName(role), $roleNames, $getRoleColor(role), and $rolePosition(role) inspect the server's roles. Positions are one-based from highest to lowest.

$hasRole(userID,role) checks a member. $userRoles(userID) returns their role names from highest to lowest, excluding @everyone.

$roleGrant(userID,+roleID,-roleID,...) adds and removes roles after validating the whole request. $createRole(name,color,hoisted,mentionable) creates a role and returns its ID; color can be six-digit hexadecimal or a decimal Discord color. $deleteRole(role) deletes a role and returns true. Discord role hierarchy rules still apply.

Additional Channel Keywords

Server commands

$channelExists(channelID) reports whether a channel is cached. $channelPosition(channelID) returns its one-based server position. $getSlowmode(channelID) returns the slowmode delay in seconds for supported channel types.

Additional Keywords

Current BCFD interpreter

$memberEffectiveDefaultAvatar - caller's underlying default avatar URL.

$createPrivateChannel(name,type) - creates a channel visible to the caller and bot. Type defaults to text; supported types are text, voice, category, announcement, stage, and forum. Requires Manage Channels and returns the new channel ID or a BCFD error.

$hour, $minute, and $second insert the current local time components, padded to two digits.

$cooldownRemaining(level) - remaining cooldown seconds. The optional level is user, server, or global; when omitted it uses the command's configured cooldown scope. Returns 0 outside a configured cooldown.

Keyword names are case-sensitive. Use $ID and $defaultAvatar with the exact Android-canonical spelling shown here. Older desktop spellings remain compatibility aliases.