Bot Creator Documentation
Everything you need to build Discord bots — BDFD $functions, JavaScript scripting, and step-by-step guides.
BDFD Function Reference
Syntax and parameters for every $function.
Browse arrow_forwardJavaScript API
db.*, interaction, message, and script globals for BDJS.
Browse arrow_forwardGuides & Tutorials
Step-by-step walkthroughs from token setup to advanced patterns.
Browse arrow_forwardrocket_launch Getting Started
Getting Started
Building Commands
Loops in BDFD: $for & $loop
Building CommandsHandling Rich Interactions in Bot Creator: Buttons, Select Menus, and Modals
Building CommandsModular Commands: `$callWorkflow` & `$workflowResponse` in BDFD
Building CommandsBuilding Interactive Buttons and Select Menus in BDFD
Building CommandsDesigning Stunning Discord Embeds in BDFD
Reference & Deployment
Advanced Topics
terminal JavaScript API
Script globals for BDJS bots — db.*, interaction, message, and more.
Embed & Message
(32)Adds a field to a Discord embed. The fields help structure information as name/value pairs in the...
Attaches a file (image, document, etc.) to a Discord message as a visual component. The file is d...
Adds a thumbnail image inside a container section. This is not the thumbnail of a classic embed b...
Adds a timestamp at the bottom of a Discord embed. By default, it displays the current date and t...
Allows role mentions in the current message. Without this call, mentioning roles in the message c...
Allows user mentions in the current message. Without this call, mentioning users in the message c...
Sets the author of a Discord embed. The author appears at the very top of the embed, above the ti...
Modifies the icon (avatar) of the author of an embed after it has been set with $author[]. Allows...
Returns the ID of the author of a specific message, identified by its ID.
Modifies the destination URL of the author of an embed. Makes the author's name clickable without...
Sets the color of the left sidebar of a Discord embed. The color can be specified in hexadecimal ...
Schedules the automatic deletion of a message after a specified duration. The message is deleted ...
Sets the main body (description) of a Discord embed. This is the main text area, located below th...
Sends a private message (DM) to a user. The bot must be able to DM the target user.
Retrieves the DM channel ID (private conversation) between the bot and a user. Automatically crea...
Schedules the editing of a message's embed after a specified delay. Unlike $editIn[], only the em...
Schedules the editing of a message after a specified delay. The current message will be replaced ...
Sets the clickable URL of an embed's title. When the user clicks on the title of the embed, they ...
Sets the footer of a Discord embed, optionally with an icon. The footer appears at the bottom of ...
Modifies the footer icon of an embed after it has been defined with $footer[]. Allows changing on...
Sets the main image of a Discord embed. The image appears at the bottom of the embed, below the f...
Schedules a delayed response to a message. The bot will send the content defined after $replyIn a...
Sends a constructed embed (via $title, $description, $addField, etc.) to a specific channel. Opti...
Sets the thumbnail of a Discord embed. The thumbnail is a small square image displayed at the top...
Sets the title of a Discord embed. The title appears at the top of the embed, in bold and with a ...
Enables text-to-speech (TTS) for the sent message.
Variables
(40)Returns the number of arguments passed to the current command.
Accesses the arguments passed to the current command. Without parameters, returns all arguments. ...
Validates the number of arguments passed to the command and stops execution with an error message...
Enables or disables a command. When disabled (no), the command is no longer executable by users.
Reads the value of a channel-scoped variable. Returns the stored value for the current channel, o...
Reads the value of a guild-member-scoped variable. Alias: $getMemberVar. Returns the stored value...
Reads the value of a guild-scoped variable. Alias: $getServerVar. Returns the stored value for th...
Returns the position of the user in the current leaderboard during iteration through a leaderboard.
Returns the value (score, points, etc.) associated with the current position in the active leader...
Reads the value of a guild-member-scoped variable. Alias: $getGuildMemberVar. Returns the stored ...
Reads the value of a message-scoped variable. Returns the stored value for the current message, o...
Reads the value of a guild-scoped variable. Alias: $getGuildVar. Returns the stored value for the...
Reads the value of a user-scoped variable. Returns the stored value for the current user, or a sp...
Reads a global variable or a user-scoped variable from the bot's persistent storage.
Generates a global ranking of all users based on a variable, sorted in descending order by default.
Gets the full text of the command input by the user, after the prefix and the command name. Equiv...
Returns a formatted list of all temporary variables currently defined in the execution context.
Gets the content of the message without mentions. Replaces mentions of users, roles, and channels...
Resets a channel-scoped variable to its default value (as defined in the Bot Creator Variables UI...
Resets a guild-member-scoped variable to its default value (as defined in the Bot Creator Variabl...
Resets a guild-scoped variable to its default value (as defined in the Bot Creator Variables UI)....
Resets a guild-member-scoped variable to its default value (as defined in the Bot Creator Variabl...
Resets a guild-scoped variable to its default value (as defined in the Bot Creator Variables UI)....
Resets a user-scoped variable to its default value (as defined in the Bot Creator Variables UI), ...
Generates a leaderboard of users on the current server based on a variable, sorted in descending ...
Stores a value into a channel-scoped variable. Writes to the current channel's variable, or to a ...
Stores a value into a guild-member-scoped variable. Alias: $setMemberVar. Writes to the current m...
Stores a value into a guild-scoped variable. Alias: $setServerVar. Writes to the current server's...
Stores a value into a guild-member-scoped variable. Alias: $setGuildMemberVar. Writes to the curr...
Stores a value into a message-scoped variable. Writes to the current message's variable, or to a ...
Stores a value into a guild-scoped variable. Alias: $setGuildVar. Writes to the current server's ...
Stores a value into a user-scoped variable. Writes to the current user's variable, or to a specif...
Creates or updates a global variable or a user-scoped variable in the bot's persistent storage.
Returns the URL of the web page currently loaded in the bot's context. Useful in web interactions...
Changes the channel context for the current command. Subsequent functions (like $sendMessage) wil...
Displays the position of the current user in a leaderboard based on a variable, along with nearby...
Reads or writes a temporary variable scoped to the current execution. In read mode (1 parameter),...
Checks whether a temporary variable with the given name currently exists in the execution context.
A compatibility stub that always returns an empty string. Provided so that BDFD scripts using the...
Counts the number of variables currently active. Optionally filters by variable type.
Control Flow
(25)Logical AND — returns "true" only if ALL provided conditions evaluate to true.
Suspends command execution until a specified asynchronous event occurs. Used to wait for user int...
Calls another workflow by name, optionally passing arguments. The called workflow executes and ca...
Modifies the remaining duration of the currently active cooldown. Can be used to extend or reduce...
Evaluates a comparison between two values and returns "true" or "false".
Checks whether a string contains a substring and returns "true" or "false".
Enforces a cooldown on command execution. Available in three scopes: per-user ($cooldown), per-gu...
Defers the interaction response, giving the bot extra time to process a command before Discord's ...
Suppresses error messages specifically related to embed rendering, preventing malformed embed err...
Dynamically parses and executes a string of BDFD code at runtime. The code is treated as a sub-sc...
Iterates over a list of values, executing the block once per item with loop metadata variables.
Returns the remaining cooldown time in seconds for the current command. Can optionally specify th...
Alias of $loopIndex. Returns the current index (iteration number) in a $forEach, $while, or $repe...
Conditional branching — executes blocks of code based on runtime condition evaluation.
Redirects execution flow to another action within the current workflow, identified by its target ...
Condition guard that stops command execution if the condition evaluates to false. Optionally send...
Stops command execution if the user's message does not contain the specified text. A specialized ...
Logical OR — returns "true" if at least one of the provided conditions evaluates to true.
Skips a specified number of subsequent actions in the current execution block.
Immediately halts all further action processing in the current execution context.
Disables internal error logging for the current command execution. Runtime errors will not be rec...
Suppresses all runtime error messages that would normally be displayed to the user when a command...
Error handling block — catches runtime errors in the try body and allows graceful recovery or log...
Pauses command execution for a specified duration. Uses BotCreatorActionType.wait to suspend proc...
Returns the last response or value produced by a BDFD workflow. Useful for chaining workflows or ...
Entity Info
(148)Returns the identifier (ID) of the AFK channel configured on the Discord server.
Returns the inactivity delay (in seconds) before a member is moved to the AFK channel.
Returns the total number of members on the server (including bots). Unlike $membersCount, this fu...
Returns the URL of the global avatar of the author of the message that triggered the command.
Returns the URL of the profile banner of the author of the message. Reserved for Nitro subscribers.
Returns the Discord ID of the author of the message that triggered the command.
Returns the complete tag of the author of the message (format "username#discriminator" or simple ...
Returns the global username of the author of the message that triggered the command.
Returns the number of active boosts (server boosts) on the current server.
Returns the Nitro boost level of the Discord server (0, 1, 2 or 3).
Returns a list of commands available on the bot.
Returns the number of bots present on the Discord server.
Returns the user ID of the bot.
Sets or returns the description of the bot displayed in the BDFD bot list.
Hides the bot from the public BDFD bot list.
Returns the username of the bot.
Returns the identifier of the node (runner) on which the bot is executed.
Returns the Discord ID of the owner of the bot.
Calculates and returns the number of bytes of a text string. Useful for checking the size of a me...
Returns the list of channel names belonging to a specific category.
Returns the number of categories on the Discord server.
Alias of $channelCategoryID. Returns the ID of the parent category of a channel.
Returns the ID of the parent category of a Discord channel.
Returns the total number of channels on the server, or the number of channels in a specific categ...
Checks if a Discord channel exists on the server. Returns "true" or "false".
Returns the ID of the Discord channel in which the command is executed.
Returns the ID of a Discord channel from its name.
Returns "true" if the channel is marked as NSFW, "false" otherwise.
Returns the name of the current Discord channel or of a specific channel via its ID.
Returns a list of all channel names on the server, separated by a customizable separator.
Returns the position of a channel in the Discord channel list.
Returns the topic of a Discord text channel.
Returns the type of a channel Discord (text, voice, category, dm, etc.).
Returns the hex color of the highest colored role of a user.
Returns the name of the folder containing the command currently being executed.
Returns the name of the command currently being executed.
Returns the trigger of the command currently being executed.
Returns the type of the command in progress (prefix or slash).
Returns the total number of commands (prefix + slash) of the bot.
Returns the creation date of a Discord entity (user, server, role, channel, etc.) from its ID.
Returns the legacy discriminator of the user (4-digit code). Returns "0" for pomelo accounts (new...
Returns the display name of the user — the server nickname if it exists, otherwise the global use...
Returns the number of custom emojis available on the Discord server.
Returns the execution time of the current command in milliseconds. Helps measure BDFD code perfor...
Searches for a channel by partial or full name and returns its ID. Case-insensitive.
Searches for a role by partial or full name and returns its ID. Case-insensitive.
Searches for a user by name, mention, or ID and returns their Discord ID. Returns an empty string...
Gets the URLs of a specific message's attachments. Returns a list of comma-separated URLs.
Gets the custom status (text and emoji) of a Discord user. Returns the text of the custom status.
Extracts the data of a specific field of an embed in a message. Allows reading the title, descrip...
Returns the total number of members on the server (including bots). Possible alias of $membersCount.
Returns the ID of a role of a user according to their index (position) in the member's list of ro...
Gets the slowmode value of a channel in seconds. Returns the minimum delay between two messages.
Returns the presence status (online, idle, dnd, offline) of the specified user.
Alias of $serverBanner. Returns the URL of the banner of the Discord server (requires boost level...
Alias of $serverCount. Returns the total number of servers the bot is present on.
Checks if a server (guild) with the given ID exists and if the bot has access to it. Returns "tru...
Alias of $serverID. Returns the unique identifier (Snowflake) of the Discord server.
Alias of $serverIcon. Returns the URL of the Discord server icon.
Alias of $serverName. Returns the name of the Discord server.
Returns the ID of the user's highest role (hierarchically) on the server.
Returns the ID of the user's highest role that possesses the specified permissions.
Returns the expiration date of the bot's hosting.
Returns the HypeSquad house to which the user belongs (Bravery, Brilliance, Balance) or "None" if...
Returns "true" if the user has the Administrator permission on the server, and "false" otherwise.
Returns "true" if the user is a server booster (Nitro Boost), and "false" otherwise.
Returns "true" if the user who triggered the command is a bot, and "false" otherwise.
Returns "true" if the user's highest role is displayed separately in the member list, "false" oth...
Checks if a role is mentionable. Returns "true" or "false".
Returns "true" if the user who triggered the command was mentioned in the message, "false" otherw...
Checks if the triggering message was edited. Returns "true" or "false".
Returns "true" if the user is currently timed out (temporarily muted) on the server, "false" othe...
Returns the ID of the last message sent in the current channel or in a specified channel.
Returns the timestamp of the last pinned message in the current or specified channel.
Returns the ID of the lowest role (hierarchically) of the user on the server (excluding @everyone).
Returns the ID of the lowest role of the user that possesses the specified permissions.
Returns the total number of members (users + bots) on the Discord server.
Returns the Discord ID of the member. Equivalent to $userID in most contexts, but explicitly orie...
Returns the nickname of the member on the server. Equivalent to $nickname.
Returns the list of effective permissions of the member on the server. Equivalent to $userPerms.
Returns the total number of members on the Discord server. Identical to $memberCount.
Returns the ID of the first user mentioned in the message. Equivalent to the first element of $me...
Returns the list of channel IDs mentioned in the message (via
Returns the list of role IDs mentioned in the message (via @role), separated by commas.
Returns the list of all user IDs mentioned in the message, separated by commas.
Returns the raw text content of the message that triggered the command.
Returns the timestamp of the last edit of the triggering message, or an empty string if it has no...
Returns the ID (snowflake) of the message that triggered the command.
Returns the creation timestamp of the triggering message.
Returns the type of the triggering message as an integer (0 = normal message, 7 = member joined, ...
Returns the jump URL (direct link) to the triggering message.
Returns the nickname of the user on the current server. Returns an empty string if no nickname is...
Returns the Node.js runtime version on which the bot is running.
Returns the number of members currently online on the Discord server (status "online", "idle", or...
Alias of $channelCategoryID. Returns the ID of a channel's parent category.
Returns the expiration date of the bot's BDFD premium subscription.
Returns the ID of the message the user replied to. Allows referencing the source message in a com...
Returns the color of a Discord role in hexadecimal format.
Returns the total number of roles on the Discord server.
Checks if a role exists on the server. Returns "true" or "false".
Returns the ID of a Discord role from its name or mention. Case-insensitive.
Returns a specific property of a Discord role.
Returns the name of a Discord role from its ID.
Returns a list of all role names on the server, separated by a customizable delimiter.
Returns the permissions of a Discord role as a text list or a raw value.
Returns the hierarchical position of a role in the server's role list.
Returns the identifier (ID) of the rules channel configured on the Discord server (Community serv...
Returns the scripting language used by the bot (BDScript or BDJS).
Returns the URL of the Discord server banner (available only for servers with boost level 2 or hi...
Returns the number of active Nitro boosts on the Discord server.
Checks if a channel with a given name exists on a server (guild). Returns true/false.
Returns the total number of servers the bot is present in.
Returns the description of the Discord server (configured in the server settings).
Returns a list of custom emojis available on the Discord server.
Returns the list of enabled premium features on the Discord server (partnership features, verific...
Returns the unique identifier (Snowflake) of the Discord server where the command was executed.
Returns the URL of the Discord server icon.
Returns a specific property of the server object (or the entire object without arguments). Allows...
Returns the name of the server (guild) in which the command is executed.
Returns the names of all servers in which the bot is present, separated by commas.
Returns the identifier (ID) of the owner of the Discord server.
Returns the voice region of the Discord server (deprecated — Discord now uses automatic voice reg...
Returns the URL of the invite splash image of the Discord server. Available only for partnered or...
Returns the custom URL code (vanity URL) of the Discord server. Available only for level 3 booste...
Returns the verification level of the server in the form of an integer (0 to 4).
Returns the identifier of the current shard on which the command is executed. Shards are used to ...
Returns the number of registered slash commands on the bot.
Returns the Discord ID of the slash command currently being executed.
Returns the value of a slash command option by name or positional index.
Returns the current slowmode delay of a Discord channel, in seconds. Read-only function (getter).
Returns the number of custom stickers available on the Discord server.
Returns the identifier (ID) of the system messages channel configured on the Discord server (welc...
Returns the global avatar URL of the user who triggered the command.
Returns the list of badges (public flags) of the user who triggered the command.
Returns the URL of the profile banner of the user who triggered the command.
Returns the accent color of the profile banner of the user in hexadecimal format.
Checks if the specified user (by ID or mention) exists on Discord and returns "true" or "false".
Returns the Discord ID of the user who triggered the command or interaction.
Returns a JSON object containing a user's information, or a specific property if requested.
Returns the date when the user joined the current Discord server.
Returns the creation date of the user's Discord account (the registration date on the platform).
Returns the global Discord username of the user who triggered the command.
Returns the list of effective permissions of the user on the current server.
Checks if a specific user reacted with a given emoji on a message. Returns true or false.
Returns the list of role IDs assigned to the user on the current server.
Returns the URL of the user's server-specific avatar (per-server avatar for Nitro subscribers).
Returns the complete tag of the user in the form "username#discriminator" (legacy format). Since ...
Returns the list of members having a specific role, separated by a delimiter.
Components & Interactions
(49)Starts a new action row for buttons or select menus.
Adds an interactive button to a message (legacy style).
Adds an interactive button using the modern component layout.
Adds a string select dropdown menu to a message.
Makes the response visible only to the user who triggered the interaction.
Adds an individual option to a checkbox group in a modal. The menuId can be omitted to target the...
Creates a visual container in a Discord message. The containers can group sections and display a ...
Creates a media gallery in a message. The gallery groups multiple media elements (images) that ca...
Adds an element (image) to a media gallery. If galleryId is omitted, the element is added to the ...
Adds an individual checkbox to a Discord modal.
Creates a checkbox group in a modal. The individual options are added using $addCheckboxGroupOpti...
Adds a file upload component to a Discord modal. Allows the user to attach a file directly from t...
Creates a group of radio buttons in a modal. The user can only select a single option at a time. ...
Adds a dropdown menu (select/dropdown) to a Discord modal. The options are added using $addSelect...
Displays a static informational text in a modal. This component is not interactive — it only serv...
Adds a text input field to a Discord modal. Supports the "short" (single row) and "paragraph" (mu...
Adds an individual option to a group of radio buttons in a modal. The menuId can be omitted to ta...
Creates a section inside a container. Sections allow organizing content (fields, text, thumbnails...
Adds a text input field directly in a message (message component, non-modal). Supports the "short...
Returns the custom ID (customId) of the interaction component that triggered the callback (button...
Modifies an existing button on a message. Allows changing the label, style, disabled state, and e...
Modifies the properties of an existing select menu: placeholder text, minimum and maximum number ...
Modifies an individual option in an existing select menu.
Gets the ID of the channel selected by the user via a channel select menu. Allows getting the res...
Gets all channel IDs selected by the user via a channel select menu. Returns a list separated by ...
Gets the ID of the mentionable entity (user or role) selected via a mentionable select menu.
Gets all mentionable entity IDs (users and roles) selected via a multi-select mentionable menu.
Gets the ID of the role selected by the user via a role select menu.
Gets all role IDs selected by the user via a multi-select role menu.
Gets the value of the option selected by the user in a string select menu.
Gets all option values selected in a multi-select string select menu.
Gets the ID of the user selected via a user select menu.
Gets all user IDs selected via a multi-select user select menu.
Creates a new modal (interactive pop-up window) with a title and a custom identifier to handle su...
Removes all interactive components (buttons, menus, text fields, etc.) from a message in a single...
Removes all buttons from a message in a single operation. Other components (menus, text fields) a...
Removes a specific component (button, menu, text field, etc.) from a message using its custom ide...
Sends a direct interaction response with optional ephemeral visibility. Preferred for button, sel...
HTTP & JSON
(32)Adds a custom HTTP header to all subsequent HTTP requests made with $httpGet, $httpPost, $httpPut...
Performs an HTTP DELETE request to the specified URL and returns the response body as a string
Performs an HTTP GET request to the specified URL and returns the response body as a string
Performs an HTTP PATCH request to the specified URL, optionally sending a partial update body, an...
Performs an HTTP POST request to the specified URL, optionally sending a request body, and return...
Performs an HTTP PUT request to the specified URL, optionally sending a request body, and returns...
Retrieves the full response body of the last HTTP request, or extracts a specific field from a JS...
Returns the HTTP status code from the most recent HTTP request made by $httpGet, $httpPost, $http...
Creates a JSON object with an optional initial value. If no value is provided, an empty JSON obje...
Creates a JSON array from a delimited string and stores it under the specified key in the current...
Appends a value to the end of a JSON array stored under the specified key.
Returns the number of items in a JSON array.
Retrieves the value at a specific index from a JSON array. Index is zero-based.
Removes and returns the last item from a JSON array.
Reverses the order of items in a JSON array in-place.
Removes and returns the first item from a JSON array, shifting all other elements down by one index.
Sorts a JSON array alphabetically or numerically in ascending or descending order.
Adds a value to the beginning of a JSON array, shifting all existing elements up by one index.
Clears the current internal JSON object, resetting it to an empty state. All previously set keys,...
Checks whether a specified key exists in the current JSON object.
Iterates over each key-value pair in the current JSON object or each element in a JSON array. Mus...
Returns the current iteration index during a $jsonForEach loop. Zero-based — starts at 0 for the ...
Joins all elements of a JSON array into a single string using the specified separator.
Returns the current key during a $jsonForEach iteration. Must be called inside a $jsonForEach block.
Returns all top-level keys of the current JSON object as a comma-separated string. Also used with...
Parses a JSON string into the internal JSON structure, replacing any existing JSON context.
Prettifies the current internal JSON structure into a human-readable, indented JSON string for di...
Sets a key to a value in the current JSON object. The value is stored as-is (string, number, bool...
Sets a key to a string value in the current JSON object, explicitly forcing the value type to str...
Converts the current internal JSON structure back into a compact JSON string with no extra whites...
Removes a key and its associated value from the current JSON object.
Retrieves the string value of a key from the current JSON object. For nested access, use dot nota...
Image & Canvas
(20)Finalizes the current canvas block, renders all queued operations, and registers the resulting im...
Attaches a remote image to the response message using a name and a URL.
Draws a bar chart with automatic scaling and configurable bar spacing
Draws a line chart with optional area fill and data point markers
Draws a pie chart from semicolon-separated data values with automatic color palette fallback
Overlays an external image at the given position with optional shape masking and blend modes
Defines a named positioning frame. Subsequent canvas operations referencing this container via th...
Creates a blank canvas with the given dimensions and optional background color
Draws an arc (outline) or pie slice (filled) using angle parameters in degrees
Draws a circle (filled or outlined) with optional blend mode support
Draws a line between two points using Bresenham's algorithm with configurable thickness
Draws a rectangle (filled or outline only) with optional blend mode
Draws a rectangle with rounded corners — filled or outline
Draws text on the canvas at the specified position with configurable font size, color, and alignment
Converts the current canvas to grayscale. No parameters.
Inverts the colors of the current canvas (negative). No parameters.
Loads an image from a URL, data URL, or base64 string onto the canvas
Draws a progress bar (horizontal or vertical) with background, fill, and optional border
Rotates the canvas by a given angle in degrees.
Sets the color of a specific pixel on the canvas.
Moderation
(88)Adds one or more reactions to the user's command message (the message that triggered the command).
Adds a new custom emoji to the server from a URL. Optionally restrict the emoji to a specific role.
Adds one or more reactions to a specific message identified by its channel and message IDs.
Adds one or more reactions to the bot's response message (the message sent by the current command...
Returns the list of permissions of the author of the command on the server. Useful for dynamicall...
Bans a user from the Discord server.
Bans a user by their user ID.
Guard function that blacklists users by ID. If the triggering user is in the list, the command is...
Guard function that blacklists roles by ID. Alias of $blacklistRoles.
Guard function that blacklists roles. If the user has any of the roles, the command is interrupted.
Guard function that blacklists servers. If the command is executed on a blacklisted server, it is...
Guard function that blacklists users by ID. Alias of $blacklistIDs. The command is interrupted if...
Makes the bot leave a server. If no ID is provided, the bot leaves the server where the command w...
Triggers the typing indicator in the current channel, showing users that the bot is typing.
Changes the username of the bot.
Changes the username of a specific user (requires elevated permissions).
Sends a message in a specific channel. Unlike $sendMessage which responds in the current channel,...
Checks if a user has all the specified permissions. Alias of $hasPerms. Returns "true" or "false".
Deletes a specified number of messages in the channel.
Removes all reactions from a specific message. Usually requires appropriate permissions to clear ...
Closes and deletes the current ticket channel. If the channel is not a ticket, an optional error ...
Creates a new channel on the server. Supports text, voice, category, announcement, and stage chan...
Creates a new role on the Discord server.
Generates the markup of a custom emoji in the format <:name:ID> for display in a message. If the ...
Deletes one or multiple channels by their ID. Alias: $deleteChannelsByName for deletion by name.
Deletes the user's command message (the message that triggered the command). Useful for keeping c...
Deletes a role from the Discord server.
Modifies the permissions of a role or a user on a specific channel using numerical permission val...
Modifies the properties of an existing thread: name, archive status, lock, and auto-archive durat...
Returns the total number of custom emojis on the current server. $emoteCount is an alias of $emoj...
Checks if a custom emoji with a given name exists on the current server. Returns true or false.
Gets the name of a custom emoji from its ID. Returns the name text of the emoji.
Gets the ban reason of a banned user on the server. Returns the reason stored in the server's ban...
Generates and returns the bot's invite link with the necessary permissions. If a guildID is provi...
Gets information about a Discord invite from its code. Returns details like the server name, numb...
Gets the text content of a message specified by its channel and message ID.
Returns the number of reactions for a specific emoji on a given message. Allows counting votes or...
Gets the hexadecimal color of a Discord role. Returns the color in
Generates or returns a permanent invite for the server. If no ID is provided, it creates an invit...
Assigns a role to a user on the server.
Assigns several roles to a user in a single operation.
Checks if a user has all specified permissions. Returns "true" or "false". Inline check, does not...
A function guard that silently ignores command execution if it is triggered in one of the listed ...
A function guard that silently stops execution if the triggering message contains an HTTP/HTTPS l...
Kicks a user from the Discord server.
Kicks the user mentioned in the message.
Modifies the properties of an existing channel, such as its name, topic, category, NSFW status, a...
Modifies the permissions of a role or user in a channel using readable permission names (sendmess...
Modifies the properties of an existing role.
Modifies the permissions of an existing role.
Mutes a user on the server.
Creates a ticket as a new text channel in a category. The creator of the ticket automatically rec...
A guard function that stops command execution if the user is not an administrator of the server.
A guard function that stops execution if the bot does not have the specified permissions in the c...
A guard function that stops execution if the bot does not have all specified permissions on the s...
A guard function that stops execution if the current channel does not belong to one of the specif...
A guard function that stops execution if the command is not executed in one of the specified chan...
A guard function that stops execution if the user's ID is not in the list of allowed IDs. Alias o...
A guard function that stops execution if the user does not possess any of the specified roles by ...
A guard function that stops execution if the user does not possess any of the specified roles.
Guard function that stops execution if the command is not used in one of the specified servers. A...
Guard function that stops execution if the user is not part of the list of authorized IDs.
Guard function that stops execution if the current channel is not marked as NSFW.
Guard function that stops command execution if the user does not have all the specified permissions.
Pins a message in the current channel. The message will appear in the channel's pinned messages l...
Publishes a message to subscribed servers (announcement channel feature). Allows broadcasting a m...
Registers the bot's slash commands on a specific server. Slash commands are immediately available...
Removes a custom emoji from the server by its name. The emoji will no longer be usable after remo...
Removes a specific reaction (emoji) from a given message. Useful for removing control reactions a...
Assigns a role to a member of the server.
Modifies the nickname of a user on the server.
Sets the exact list of roles for a user, replacing all of their current roles.
Creates a discussion thread from the current message or a specified message. Threads allow organi...
Removes a role from a user on the server.
Removes several roles from a user in a single operation.
Adds a member to a thread. Useful for private threads where members must be added manually.
Returns the total number of messages in a thread. Includes messages within the thread only, not t...
Removes a member from a thread. The user will no longer be able to view or participate in the pri...
Returns the number of members in a thread. Useful for tracking participation in discussions.
Temporarily times out a user (temporary silence).
Unbans a user from the server using their ID. The user will be able to rejoin the server with a n...
Unbans a user from the server using only their ID. Works similarly to $unBan but optimized for ra...
Removes the timeout of a user before its expiration.
Removes the mute of a user.
Removes a pinned message from the pinned messages list of the channel.
Deletes all slash commands of the bot on a specific server. Global commands are not affected.
Gets the user limit of a voice channel. Returns the maximum number of users that can connect simu...
Math & Text
(58)Alias of $calculate. Performs a mathematical calculation and returns the result. Supports basic o...
Evaluates a complete mathematical expression (operators, functions, comparisons).
Rounds a number up to the next integer.
Counts the number of characters in the given text.
Truncates text to a maximum length and optionally appends a suffix (default: "...") when truncati...
Divides the first value by the second (a / b). If the divisor is 0, it returns 0 instead of gener...
Replaces the value of a spreads element at the specified index with a new value.
Rounds a number down to the nearest integer.
Returns the current index during split text iteration within loops. Useful for tracking position ...
Returns the total number of elements in the current split text array.
Returns the current Unix timestamp in milliseconds. Resolved at runtime.
Checks if a user has a specific role on the server.
Checks if a user is banned from the current server.
Checks if a value is strictly a boolean (true or false).
Checks if a custom emoji is animated.
Checks if a value is an integer (positive, negative or zero).
Checks if a channel is marked as NSFW.
Checks if a value is a number (integer or decimal, positive or negative).
Checks if the command was triggered via a slash command.
Checks if the current channel is a ticket channel opened with $newTicket.
Checks if the private messages (DMs) of a user are open.
Checks if a string is a valid hexadecimal color code.
Joins all elements from the current split text back into a single string, separated by the given ...
Counts the number of lines in the given text. Lines are separated by newline characters.
Calculates the natural logarithm (base e) of a number.
Returns the largest value among the provided arguments.
Returns the smallest value among the provided arguments.
Calculates the remainder of the division of a by b (a % b). If b = 0, returns 0.
Multiplies two values (a * b).
Formats a number by adding thousands separators (commas) for readability.
Generates a random integer between min and max (inclusive). The value is evaluated at compile-tim...
Returns the ID of a random category from all categories on the current server.
Returns the ID of a random channel present on the server.
Returns the ID of a random server among the servers where the bot is present.
Returns the mention (format <@id>) of a random user present on the server.
Returns the ID of a random role present on the server.
Generates a random alphanumeric string of the specified length.
Randomly chooses and returns an option from a list of provided text options.
Returns the ID or mention of a random user present on the server.
Returns the ID of a random user present on the server.
Removes all occurrences of a string in a given text. Searches and replaces with an empty string.
Removes all URLs (HTTP/HTTPS links) from a text. Useful for anti-spam moderation.
Removes the element at the specified index from the current split text array.
Sends a message multiple times. The message is repeated 'count' times in the channel.
Replaces all occurrences of a search string with a replacement string in the given input text.
Rounds a number to the nearest integer. Values ending in .5 are rounded up or according to banker...
Sorts elements (separated by the given delimiter) and returns them as a single string.
Retrieves the element at the specified index from the most recent $textSpreads operation.
Calculates the square root of a number.
Subtracts the second value from the first (a - b).
Calculates the sum of all provided values.
Splits a text string into an array using the specified separator and stores it for later access w...
Converts all characters in the given text to lowercase.
Converts the first letter of each word to uppercase and the rest to lowercase.
Converts all characters in the given text to uppercase.
Removes leading and trailing spaces from a text (trim). Does not modify spaces within the text.
Removes leading and trailing whitespace (spaces, tabs, newlines) from the given text.
Converts the escape sequences in a string into their real characters. For example, \n becomes a r...
Date & Time
(9)Returns the current date. This function is resolved at runtime.
Returns the current day of the month (1 to 31). Resolved at runtime.
Returns the current Unix timestamp in seconds. Resolved at runtime.
Returns the current hour (0 to 23). Resolved at runtime.
Returns the current minute (0 to 59). Resolved at runtime.
Returns the current month as a number (1 to 12). Resolved at runtime.
Returns the current second (0 to 59). Resolved at runtime.
Returns the current time in HH:MM:SS format. Resolved at runtime.
Returns the current year (e.g., 2026). Resolved at runtime.
Music
(18)Joins a voice channel; if no channel ID is given, joins the user's current voice channel
Returns the author/artist of the currently playing track
Returns the total duration of the currently playing track in milliseconds
Returns "true" if looping is currently enabled, "false" otherwise
Returns "true" if playback is currently paused, "false" otherwise
Returns the title of the currently playing track
Returns the current playback position in milliseconds
Returns the number of tracks currently in the music queue
Returns the current playback volume level (0–100)
Leaves the current voice channel
Pauses the current music playback
Plays a track from a search query or URL, auto-joining a voice channel if needed
Resumes music playback if it was previously paused
Seeks to a specific position in the currently playing track
Sets the looping mode for music playback
Sets the music playback volume to a level between 0 and 100
Skips the currently playing track and plays the next track in the queue
Stops music playback and clears the entire queue
Webhooks & Integrations
(10)Sets the URL of the avatar for the next message sent via $webhookSend. Must be placed before the ...
Sets the color of the sidebar of the embed for the next message sent via $webhookSend.
Sets the text content of the next message sent via $webhookSend. Alternative to the second parame...
Creates a new webhook in a specified channel and returns its URL. The created webhook can then be...
Deletes an existing Discord webhook using its ID and token. Useful for cleaning up dynamically cr...
Sets the description (body) of the embed for the next message sent via $webhookSend.
Sets the text of the footer of the embed for the next message sent via $webhookSend.
Sends a message via a Discord webhook. Allows sending formatted content, embeds, and files to an ...
Sets the title of the embed for the next message sent via $webhookSend.
Sets the username displayed for the next message sent via $webhookSend.
Cooldown
(2)Permission
(1)Flags & Debug
(7)Enables an alternative parsing mode for the current command. Useful for resolving certain syntax ...
Enables debug mode for the current command. Displays diagnostic information in the console or BDF...
Disables the automatic removal of spaces inside BDFD function parameters. By default, BDFD trims ...
Disables the automatic escaping of special characters (brackets, semicolons, etc.) in parameters....
Enables decimal display in calculation results. By default, BDFD rounds numerical results.
Displays information on the remaining log quota for the BDFD application. Useful for monitoring c...
Disables code optimization for the current command. All code is executed linearly without parser ...
Meta
(6)Choose between app hosting and the self-hosted Docker runner for running Bot Creator bots.
How event-driven workflows and ((...)) placeholders work in Bot Creator bots.
Start here — set up a bot, write your first command, and find the right documentation section.
Buttons, select menus, modals, and slash commands — how Bot Creator handles rich Discord interact...
Model Context Protocol server for AI-assisted documentation lookup.
Reference guide for the ((...)) template system used in Bot Creator messages, embeds, and action ...
Misc
(11)Throws a custom error and stops command execution.
Defines a reusable function block in BDScript.
Ends a function block started with $func.
Repeats a block of actions a fixed number of times.
Returns the bot's WebSocket latency in milliseconds.
Returns the elapsed time since the bot started.