menu_book Documentation Hub

Bot Creator Documentation

Everything you need to build Discord bots — BDFD $functions, JavaScript scripting, and step-by-step guides.

code

BDFD Function Reference

Syntax and parameters for every $function.

Browse arrow_forward
terminal

JavaScript API

db.*, interaction, message, and script globals for BDJS.

Browse arrow_forward
library_books

Guides & Tutorials

Step-by-step walkthroughs from token setup to advanced patterns.

Browse arrow_forward

rocket_launch Getting Started

terminal JavaScript API

Script globals for BDJS bots — db.*, interaction, message, and more.

View JavaScript API reference arrow_forward

Embed & Message

(32)
Allowmention

Deletemessage

Editmessage

Nomention

Reply

Sendmessage

$addField[name;value;(inline);(index)]

Adds a field to a Discord embed. The fields help structure information as name/value pairs in the...

$addFile[url;(spoiler)]

Attaches a file (image, document, etc.) to a Discord message as a visual component. The file is d...

$addThumbnail[url;(description);(spoiler)]

Adds a thumbnail image inside a container section. This is not the thumbnail of a classic embed b...

$addTimestamp[(timestamp);(embedIndex)]

Adds a timestamp at the bottom of a Discord embed. By default, it displays the current date and t...

$allowRoleMentions

Allows role mentions in the current message. Without this call, mentioning roles in the message c...

$allowUserMentions

Allows user mentions in the current message. Without this call, mentioning users in the message c...

$author[name;(iconURL);(url);(embedIndex)]

Sets the author of a Discord embed. The author appears at the very top of the embed, above the ti...

$authorIcon[url;(embedIndex)]

Modifies the icon (avatar) of the author of an embed after it has been set with $author[]. Allows...

$authorOfMessage[messageID]

Returns the ID of the author of a specific message, identified by its ID.

$authorUrl[url;(embedIndex)]

Modifies the destination URL of the author of an embed. Makes the author's name clickable without...

$color[hexColor;(embedIndex)]

Sets the color of the left sidebar of a Discord embed. The color can be specified in hexadecimal ...

$deleteIn[duration]

Schedules the automatic deletion of a message after a specified duration. The message is deleted ...

$description[text;(embedIndex)]

Sets the main body (description) of a Discord embed. This is the main text area, located below th...

$dm[userID;content]

Sends a private message (DM) to a user. The bot must be able to DM the target user.

$dmChannelID[userID]

Retrieves the DM channel ID (private conversation) between the bot and a user. Automatically crea...

$editEmbedIn[duration]

Schedules the editing of a message's embed after a specified delay. Unlike $editIn[], only the em...

$editIn[duration;(messageId)]

Schedules the editing of a message after a specified delay. The current message will be replaced ...

$embeddedURL[url;(embedIndex)]

Sets the clickable URL of an embed's title. When the user clicks on the title of the embed, they ...

$footer[text;(iconURL);(embedIndex)]

Sets the footer of a Discord embed, optionally with an icon. The footer appears at the bottom of ...

$footerIcon[url;(embedIndex)]

Modifies the footer icon of an embed after it has been defined with $footer[]. Allows changing on...

$image[url;(embedIndex)]

Sets the main image of a Discord embed. The image appears at the bottom of the embed, below the f...

$replyIn[duration]

Schedules a delayed response to a message. The bot will send the content defined after $replyIn a...

$sendEmbedMessage[(channelId);(messageId)]

Sends a constructed embed (via $title, $description, $addField, etc.) to a specific channel. Opti...

$thumbnail[url;(embedIndex)]

Sets the thumbnail of a Discord embed. The thumbnail is a small square image displayed at the top...

$title[text;(embedIndex)]

Sets the title of a Discord embed. The title appears at the top of the embed, in bold and with a ...

$tts

Enables text-to-speech (TTS) for the sent message.

Variables

(40)
$argCount

Returns the number of arguments passed to the current command.

$args / $args[index] / $args[index;option]

Accesses the arguments passed to the current command. Without parameters, returns all arguments. ...

$argsCheck[operator;count;errorMessage]

Validates the number of arguments passed to the command and stops execution with an error message...

$enabled[yes/no]

Enables or disables a command. When disabled (no), the command is no longer executable by users.

$getChannelVar[name] or $getChannelVar[name;Channel ID]

Reads the value of a channel-scoped variable. Returns the stored value for the current channel, o...

$getGuildMemberVar[name] or $getGuildMemberVar[name;User ID] or $getGuildMemberVar[name;User ID;Guild ID]

Reads the value of a guild-member-scoped variable. Alias: $getMemberVar. Returns the stored value...

$getGuildVar[name] or $getGuildVar[name;Guild ID]

Reads the value of a guild-scoped variable. Alias: $getServerVar. Returns the stored value for th...

$getLeaderboardPosition

Returns the position of the user in the current leaderboard during iteration through a leaderboard.

$getLeaderboardValue

Returns the value (score, points, etc.) associated with the current position in the active leader...

$getMemberVar[name] or $getMemberVar[name;User ID] or $getMemberVar[name;User ID;Guild ID]

Reads the value of a guild-member-scoped variable. Alias: $getGuildMemberVar. Returns the stored ...

$getMessageVar[name] or $getMessageVar[name;Message ID]

Reads the value of a message-scoped variable. Returns the stored value for the current message, o...

$getServerVar[name] or $getServerVar[name;Guild ID]

Reads the value of a guild-scoped variable. Alias: $getGuildVar. Returns the stored value for the...

$getUserVar[name] or $getUserVar[name;User ID] or $getUserVar[name;User ID;Guild ID]

Reads the value of a user-scoped variable. Returns the stored value for the current user, or a sp...

$getVar[name;(User ID)]

Reads a global variable or a user-scoped variable from the bot's persistent storage.

$globalUserLeaderboard[variable] or $globalUserLeaderboard[variable;sort]

Generates a global ranking of all users based on a variable, sorted in descending order by default.

$input

Gets the full text of the command input by the user, after the prefix and the command name. Equiv...

$listVar[(separator)]

Returns a formatted list of all temporary variables currently defined in the execution context.

$noMentionMessage

Gets the content of the message without mentions. Replaces mentions of users, roles, and channels...

$resetChannelVar[name] or $resetChannelVar[name;Channel ID]

Resets a channel-scoped variable to its default value (as defined in the Bot Creator Variables UI...

$resetGuildMemberVar[name] or $resetGuildMemberVar[name;User ID] or $resetGuildMemberVar[name;User ID;Guild ID]

Resets a guild-member-scoped variable to its default value (as defined in the Bot Creator Variabl...

$resetGuildVar[name] or $resetGuildVar[name;Guild ID]

Resets a guild-scoped variable to its default value (as defined in the Bot Creator Variables UI)....

$resetMemberVar[name] or $resetMemberVar[name;User ID] or $resetMemberVar[name;User ID;Guild ID]

Resets a guild-member-scoped variable to its default value (as defined in the Bot Creator Variabl...

$resetServerVar[name] or $resetServerVar[name;Guild ID]

Resets a guild-scoped variable to its default value (as defined in the Bot Creator Variables UI)....

$resetUserVar[name] or $resetUserVar[name;User ID]

Resets a user-scoped variable to its default value (as defined in the Bot Creator Variables UI), ...

$serverLeaderboard[variable] or $serverLeaderboard[variable;sort]

Generates a leaderboard of users on the current server based on a variable, sorted in descending ...

$setChannelVar[name;value] or $setChannelVar[name;value;Channel ID]

Stores a value into a channel-scoped variable. Writes to the current channel's variable, or to a ...

$setGuildMemberVar[name;value] or $setGuildMemberVar[name;value;User ID] or $setGuildMemberVar[name;value;User ID;Guild ID]

Stores a value into a guild-member-scoped variable. Alias: $setMemberVar. Writes to the current m...

$setGuildVar[name;value] or $setGuildVar[name;value;Guild ID]

Stores a value into a guild-scoped variable. Alias: $setServerVar. Writes to the current server's...

$setMemberVar[name;value] or $setMemberVar[name;value;User ID] or $setMemberVar[name;value;User ID;Guild ID]

Stores a value into a guild-member-scoped variable. Alias: $setGuildMemberVar. Writes to the curr...

$setMessageVar[name;value] or $setMessageVar[name;value;Message ID]

Stores a value into a message-scoped variable. Writes to the current message's variable, or to a ...

$setServerVar[name;value] or $setServerVar[name;value;Guild ID]

Stores a value into a guild-scoped variable. Alias: $setGuildVar. Writes to the current server's ...

$setUserVar[name;value] or $setUserVar[name;value;User ID]

Stores a value into a user-scoped variable. Writes to the current user's variable, or to a specif...

$setVar[name;value;(User ID)]

Creates or updates a global variable or a user-scoped variable in the bot's persistent storage.

$url

Returns the URL of the web page currently loaded in the bot's context. Useful in web interactions...

$useChannel[channelID]

Changes the channel context for the current command. Subsequent functions (like $sendMessage) wil...

$userLeaderboard[variable] or $userLeaderboard[variable;sort]

Displays the position of the current user in a leaderboard based on a variable, along with nearby...

$var[name] / $var[name;value]

Reads or writes a temporary variable scoped to the current execution. In read mode (1 parameter),...

$varExists[name]

Checks whether a temporary variable with the given name currently exists in the execution context.

$varExistsError[name]

A compatibility stub that always returns an empty string. Provided so that BDFD scripts using the...

$variablesCount[(Type)]

Counts the number of variables currently active. Optionally filters by variable type.

Control Flow

(25)
$and[condition1;condition2;...]

Logical AND — returns "true" only if ALL provided conditions evaluate to true.

$awaitFunc[functionName;(userID);(channelID)]

Suspends command execution until a specified asynchronous event occurs. Used to wait for user int...

$callWorkflow[name;arg1;arg2;...]

Calls another workflow by name, optionally passing arguments. The called workflow executes and ca...

$changeCooldownTime[duration]

Modifies the remaining duration of the currently active cooldown. Can be used to extend or reduce...

$checkCondition[operator;value1;value2]

Evaluates a comparison between two values and returns "true" or "false".

$checkContains[text;search]

Checks whether a string contains a substring and returns "true" or "false".

$cooldown[duration;(errorMessage)]

Enforces a cooldown on command execution. Available in three scopes: per-user ($cooldown), per-gu...

$defer

Defers the interaction response, giving the bot extra time to process a command before Discord's ...

$embedSuppressErrors

Suppresses error messages specifically related to embed rendering, preventing malformed embed err...

$eval[bdfdCode]

Dynamically parses and executes a string of BDFD code at runtime. The code is treated as a sub-sc...

$for[iteratorName;values].. $endFor

Iterates over a list of values, executing the block once per item with loop metadata variables.

$getCooldown or $getCooldown[type]

Returns the remaining cooldown time in seconds for the current command. Can optionally specify th...

$i

Alias of $loopIndex. Returns the current index (iteration number) in a $forEach, $while, or $repe...

$if[condition].. $elseIf[condition].. $else.. $endif

Conditional branching — executes blocks of code based on runtime condition evaluation.

$jumpToAction[targetKey]

Redirects execution flow to another action within the current workflow, identified by its target ...

$onlyIf[condition] or $onlyIf[condition;errorMessage]

Condition guard that stops command execution if the condition evaluates to false. Optionally send...

$onlyIfMessageContains[text]

Stops command execution if the user's message does not contain the specified text. A specialized ...

$or[condition1;condition2;...]

Logical OR — returns "true" if at least one of the provided conditions evaluates to true.

$skipActions[count]

Skips a specified number of subsequent actions in the current execution block.

$stop

Immediately halts all further action processing in the current execution context.

$suppressErrorLogging

Disables internal error logging for the current command execution. Runtime errors will not be rec...

$suppressErrors

Suppresses all runtime error messages that would normally be displayed to the user when a command...

$try.. $catch.. $endTry

Error handling block — catches runtime errors in the try body and allows graceful recovery or log...

$wait[duration]

Pauses command execution for a specified duration. Uses BotCreatorActionType.wait to suspend proc...

$workflowResponse

Returns the last response or value produced by a BDFD workflow. Useful for chaining workflows or ...

Entity Info

(148)
$afkChannelID

Returns the identifier (ID) of the AFK channel configured on the Discord server.

$afkTimeout

Returns the inactivity delay (in seconds) before a member is moved to the AFK channel.

$allMembersCount

Returns the total number of members on the server (including bots). Unlike $membersCount, this fu...

$authorAvatar

Returns the URL of the global avatar of the author of the message that triggered the command.

$authorBanner

Returns the URL of the profile banner of the author of the message. Reserved for Nitro subscribers.

$authorID

Returns the Discord ID of the author of the message that triggered the command.

$authorTag

Returns the complete tag of the author of the message (format "username#discriminator" or simple ...

$authorUsername

Returns the global username of the author of the message that triggered the command.

$boostCount

Returns the number of active boosts (server boosts) on the current server.

$boostLevel

Returns the Nitro boost level of the Discord server (0, 1, 2 or 3).

$botCommands

Returns a list of commands available on the bot.

$botCount

Returns the number of bots present on the Discord server.

$botID

Returns the user ID of the bot.

$botListDescription[text]

Sets or returns the description of the bot displayed in the BDFD bot list.

$botListHide

Hides the bot from the public BDFD bot list.

$botName

Returns the username of the bot.

$botNode

Returns the identifier of the node (runner) on which the bot is executed.

$botOwnerID

Returns the Discord ID of the owner of the bot.

$byteCount[text]

Calculates and returns the number of bytes of a text string. Useful for checking the size of a me...

$categoryChannels[categoryID;(separator)]

Returns the list of channel names belonging to a specific category.

$categoryCount

Returns the number of categories on the Discord server.

$categoryID[(channelID)]

Alias of $channelCategoryID. Returns the ID of the parent category of a channel.

$channelCategoryID[(channelID)]

Returns the ID of the parent category of a Discord channel.

$channelCount[(categoryID)]

Returns the total number of channels on the server, or the number of channels in a specific categ...

$channelExists[channelID]

Checks if a Discord channel exists on the server. Returns "true" or "false".

$channelID

Returns the ID of the Discord channel in which the command is executed.

$channelIDFromName[name]

Returns the ID of a Discord channel from its name.

$channelNSFW[(channelID)]

Returns "true" if the channel is marked as NSFW, "false" otherwise.

$channelName[(channelID)]

Returns the name of the current Discord channel or of a specific channel via its ID.

$channelNames[(separator)]

Returns a list of all channel names on the server, separated by a customizable separator.

$channelPosition[(channelID)]

Returns the position of a channel in the Discord channel list.

$channelTopic[(channelID)]

Returns the topic of a Discord text channel.

$channelType[(channelID)]

Returns the type of a channel Discord (text, voice, category, dm, etc.).

$colorRole[userID;(guildID)]

Returns the hex color of the highest colored role of a user.

$commandFolder

Returns the name of the folder containing the command currently being executed.

$commandName

Returns the name of the command currently being executed.

$commandTrigger

Returns the trigger of the command currently being executed.

$commandType

Returns the type of the command in progress (prefix or slash).

$commandsCount

Returns the total number of commands (prefix + slash) of the bot.

$creationDate[entityID]

Returns the creation date of a Discord entity (user, server, role, channel, etc.) from its ID.

$discriminator

Returns the legacy discriminator of the user (4-digit code). Returns "0" for pomelo accounts (new...

$displayName

Returns the display name of the user — the server nickname if it exists, otherwise the global use...

$emojiCount

Returns the number of custom emojis available on the Discord server.

$executionTime

Returns the execution time of the current command in milliseconds. Helps measure BDFD code perfor...

$findChannel[query]

Searches for a channel by partial or full name and returns its ID. Case-insensitive.

$findRole[query;(guildID)]

Searches for a role by partial or full name and returns its ID. Case-insensitive.

$findUser[name/mention/ID]

Searches for a user by name, mention, or ID and returns their Discord ID. Returns an empty string...

$getAttachments[messageID]

Gets the URLs of a specific message's attachments. Returns a list of comma-separated URLs.

$getCustomStatus[(userID)]

Gets the custom status (text and emoji) of a Discord user. Returns the text of the custom status.

$getEmbedData[messageID;embedIndex;field]

Extracts the data of a specific field of an embed in a message. Allows reading the title, descrip...

$getMembersCount

Returns the total number of members on the server (including bots). Possible alias of $membersCount.

$getRole[userID;index;(guildID)]

Returns the ID of a role of a user according to their index (position) in the member's list of ro...

$getSlowmode[(channelID)]

Gets the slowmode value of a channel in seconds. Returns the minimum delay between two messages.

$getUserStatus[userID]

Returns the presence status (online, idle, dnd, offline) of the specified user.

$guildBanner

Alias of $serverBanner. Returns the URL of the banner of the Discord server (requires boost level...

$guildCount

Alias of $serverCount. Returns the total number of servers the bot is present on.

$guildExists[guildId]

Checks if a server (guild) with the given ID exists and if the bot has access to it. Returns "tru...

$guildID

Alias of $serverID. Returns the unique identifier (Snowflake) of the Discord server.

$guildIcon

Alias of $serverIcon. Returns the URL of the Discord server icon.

$guildName

Alias of $serverName. Returns the name of the Discord server.

$highestRole

Returns the ID of the user's highest role (hierarchically) on the server.

$highestRoleWithPerms[permission1;permission2;...]

Returns the ID of the user's highest role that possesses the specified permissions.

$hostingExpireTime

Returns the expiration date of the bot's hosting.

$hypeSquad[(userID)]

Returns the HypeSquad house to which the user belongs (Bravery, Brilliance, Balance) or "None" if...

$isAdmin

Returns "true" if the user has the Administrator permission on the server, and "false" otherwise.

$isBooster

Returns "true" if the user is a server booster (Nitro Boost), and "false" otherwise.

$isBot

Returns "true" if the user who triggered the command is a bot, and "false" otherwise.

$isHoisted

Returns "true" if the user's highest role is displayed separately in the member list, "false" oth...

$isMentionable[roleID;(guildID)]

Checks if a role is mentionable. Returns "true" or "false".

$isMentioned

Returns "true" if the user who triggered the command was mentioned in the message, "false" otherw...

$isMessageEdited

Checks if the triggering message was edited. Returns "true" or "false".

$isTimedOut

Returns "true" if the user is currently timed out (temporarily muted) on the server, "false" othe...

$lastMessageID[(channelID)]

Returns the ID of the last message sent in the current channel or in a specified channel.

$lastPinTimestamp[(channelID)]

Returns the timestamp of the last pinned message in the current or specified channel.

$lowestRole

Returns the ID of the lowest role (hierarchically) of the user on the server (excluding @everyone).

$lowestRoleWithPerms[permission1;permission2;...]

Returns the ID of the lowest role of the user that possesses the specified permissions.

$memberCount

Returns the total number of members (users + bots) on the Discord server.

$memberID

Returns the Discord ID of the member. Equivalent to $userID in most contexts, but explicitly orie...

$memberNick

Returns the nickname of the member on the server. Equivalent to $nickname.

$memberPerms

Returns the list of effective permissions of the member on the server. Equivalent to $userPerms.

$membersCount

Returns the total number of members on the Discord server. Identical to $memberCount.

$mentioned

Returns the ID of the first user mentioned in the message. Equivalent to the first element of $me...

$mentionedChannels

Returns the list of channel IDs mentioned in the message (via

$mentionedRoles

Returns the list of role IDs mentioned in the message (via @role), separated by commas.

$mentions

Returns the list of all user IDs mentioned in the message, separated by commas.

$message

Returns the raw text content of the message that triggered the command.

$messageEditedTimestamp

Returns the timestamp of the last edit of the triggering message, or an empty string if it has no...

$messageID

Returns the ID (snowflake) of the message that triggered the command.

$messageTimestamp

Returns the creation timestamp of the triggering message.

$messageType

Returns the type of the triggering message as an integer (0 = normal message, 7 = member joined, ...

$messageURL

Returns the jump URL (direct link) to the triggering message.

$nickname

Returns the nickname of the user on the current server. Returns an empty string if no nickname is...

$nodeVersion

Returns the Node.js runtime version on which the bot is running.

$onlineMembers

Returns the number of members currently online on the Discord server (status "online", "idle", or...

$parentID[(channelID)]

Alias of $channelCategoryID. Returns the ID of a channel's parent category.

$premiumExpireTime

Returns the expiration date of the bot's BDFD premium subscription.

$repliedMessageID

Returns the ID of the message the user replied to. Allows referencing the source message in a com...

$roleColor[roleID;(guildID)]

Returns the color of a Discord role in hexadecimal format.

$roleCount[(guildID)]

Returns the total number of roles on the Discord server.

$roleExists[roleID;(guildID)]

Checks if a role exists on the server. Returns "true" or "false".

$roleID[name;(guildID)]

Returns the ID of a Discord role from its name or mention. Case-insensitive.

$roleInfo[roleID;property;(guildID)]

Returns a specific property of a Discord role.

$roleName[roleID;(guildID)]

Returns the name of a Discord role from its ID.

$roleNames[(separator);(guildID)]

Returns a list of all role names on the server, separated by a customizable delimiter.

$rolePerms[roleID;(guildID)]

Returns the permissions of a Discord role as a text list or a raw value.

$rolePosition[roleID;(guildID)]

Returns the hierarchical position of a role in the server's role list.

$rulesChannelID

Returns the identifier (ID) of the rules channel configured on the Discord server (Community serv...

$scriptLanguage

Returns the scripting language used by the bot (BDScript or BDJS).

$serverBanner

Returns the URL of the Discord server banner (available only for servers with boost level 2 or hi...

$serverBoostCount

Returns the number of active Nitro boosts on the Discord server.

$serverChannelExists[name;guildID]

Checks if a channel with a given name exists on a server (guild). Returns true/false.

$serverCount

Returns the total number of servers the bot is present in.

$serverDescription

Returns the description of the Discord server (configured in the server settings).

$serverEmojis

Returns a list of custom emojis available on the Discord server.

$serverFeatures

Returns the list of enabled premium features on the Discord server (partnership features, verific...

$serverID

Returns the unique identifier (Snowflake) of the Discord server where the command was executed.

$serverIcon

Returns the URL of the Discord server icon.

$serverInfo[property]

Returns a specific property of the server object (or the entire object without arguments). Allows...

$serverName

Returns the name of the server (guild) in which the command is executed.

$serverNames

Returns the names of all servers in which the bot is present, separated by commas.

$serverOwner

Returns the identifier (ID) of the owner of the Discord server.

$serverRegion

Returns the voice region of the Discord server (deprecated — Discord now uses automatic voice reg...

$serverSplash

Returns the URL of the invite splash image of the Discord server. Available only for partnered or...

$serverVanityURL

Returns the custom URL code (vanity URL) of the Discord server. Available only for level 3 booste...

$serverVerificationLevel

Returns the verification level of the server in the form of an integer (0 to 4).

$shardID

Returns the identifier of the current shard on which the command is executed. Shards are used to ...

$slashCommandsCount

Returns the number of registered slash commands on the bot.

$slashID

Returns the Discord ID of the slash command currently being executed.

$slashOption

Returns the value of a slash command option by name or positional index.

$slowmode[(channelID)]

Returns the current slowmode delay of a Discord channel, in seconds. Read-only function (getter).

$stickerCount

Returns the number of custom stickers available on the Discord server.

$systemChannelID

Returns the identifier (ID) of the system messages channel configured on the Discord server (welc...

$userAvatar

Returns the global avatar URL of the user who triggered the command.

$userBadges

Returns the list of badges (public flags) of the user who triggered the command.

$userBanner

Returns the URL of the profile banner of the user who triggered the command.

$userBannerColor

Returns the accent color of the profile banner of the user in hexadecimal format.

$userExists[userID/mention]

Checks if the specified user (by ID or mention) exists on Discord and returns "true" or "false".

$userID

Returns the Discord ID of the user who triggered the command or interaction.

$userInfo[userID;(property)]

Returns a JSON object containing a user's information, or a specific property if requested.

$userJoined

Returns the date when the user joined the current Discord server.

$userJoinedDiscord

Returns the creation date of the user's Discord account (the registration date on the platform).

$userName

Returns the global Discord username of the user who triggered the command.

$userPerms

Returns the list of effective permissions of the user on the current server.

$userReacted[messageID;userID;emoji]

Checks if a specific user reacted with a given emoji on a message. Returns true or false.

$userRoles

Returns the list of role IDs assigned to the user on the current server.

$userServerAvatar

Returns the URL of the user's server-specific avatar (per-server avatar for Nitro subscribers).

$userTag

Returns the complete tag of the user in the form "username#discriminator" (legacy format). Since ...

$usersWithRole[roleID;(separator);(guildID)]

Returns the list of members having a specific role, separated by a delimiter.

Components & Interactions

(49)
Addactionrow

Starts a new action row for buttons or select menus.

Addbutton

Adds an interactive button to a message (legacy style).

Addbuttoncv2

Adds an interactive button using the modern component layout.

Addcategoryselect

Addchannelselect

Addmentionableselect

Addroleselect

Addselectmenuoption

Addseparator

Addstringselect

Adds a string select dropdown menu to a message.

Addstringselectoption

Addtextdisplay

Adduserselect

Addvoiceselect

Ephemeral

Makes the response visible only to the user who triggered the interaction.

Newselectmenu

$addCheckboxGroupOption[menuId;label;value;(description);(default)]

Adds an individual option to a checkbox group in a modal. The menuId can be omitted to target the...

$addContainer[(id);(accentColor);(spoiler)]

Creates a visual container in a Discord message. The containers can group sections and display a ...

$addMediaGallery[(id)]

Creates a media gallery in a message. The gallery groups multiple media elements (images) that ca...

$addMediaGalleryItem[url;(description);(spoiler);(galleryId)]

Adds an element (image) to a media gallery. If galleryId is omitted, the element is added to the ...

$addModalCheckbox[customId;label;(default)]

Adds an individual checkbox to a Discord modal.

$addModalCheckboxGroup[customId;label;(required)]

Creates a checkbox group in a modal. The individual options are added using $addCheckboxGroupOpti...

$addModalFileUpload[customId;label;(required)]

Adds a file upload component to a Discord modal. Allows the user to attach a file directly from t...

$addModalRadioGroup[customId;label;(required)]

Creates a group of radio buttons in a modal. The user can only select a single option at a time. ...

$addModalSelect[customId;label;(placeholder);(required)]

Adds a dropdown menu (select/dropdown) to a Discord modal. The options are added using $addSelect...

$addModalTextDisplay[content]

Displays a static informational text in a modal. This component is not interactive — it only serv...

$addModalTextInput[customId;label;(style);(placeholder);(default);(required);(minLength);(maxLength)]

Adds a text input field to a Discord modal. Supports the "short" (single row) and "paragraph" (mu...

$addRadioGroupOption[menuId;label;value;(description);(default)]

Adds an individual option to a group of radio buttons in a modal. The menuId can be omitted to ta...

$addSection[(id)]

Creates a section inside a container. Sections allow organizing content (fields, text, thumbnails...

$addTextInput[customId;label;(style);(placeholder);(default);(required);(minLength);(maxLength)]

Adds a text input field directly in a message (message component, non-modal). Supports the "short...

$customID

Returns the custom ID (customId) of the interaction component that triggered the callback (button...

$editButton[idOrUrl;label;(style);(disabled);(emoji)]

Modifies an existing button on a message. Allows changing the label, style, disabled state, and e...

$editSelectMenu[customId;placeholder;minValues;maxValues]

Modifies the properties of an existing select menu: placeholder text, minimum and maximum number ...

$editSelectMenuOption[menuId;label;value;description;default;emoji]

Modifies an individual option in an existing select menu.

$getChannelSelectChannelID[(index)]

Gets the ID of the channel selected by the user via a channel select menu. Allows getting the res...

$getChannelSelectChannelIDs[(separator)]

Gets all channel IDs selected by the user via a channel select menu. Returns a list separated by ...

$getMentionableSelectUserID[(index)]

Gets the ID of the mentionable entity (user or role) selected via a mentionable select menu.

$getMentionableSelectUserIDs[(separator)]

Gets all mentionable entity IDs (users and roles) selected via a multi-select mentionable menu.

$getRoleSelectRoleID[(index)]

Gets the ID of the role selected by the user via a role select menu.

$getRoleSelectRoleIDs[(separator)]

Gets all role IDs selected by the user via a multi-select role menu.

$getStringSelectValue[(index)]

Gets the value of the option selected by the user in a string select menu.

$getStringSelectValues[(separator)]

Gets all option values selected in a multi-select string select menu.

$getUserSelectUserID[(index)]

Gets the ID of the user selected via a user select menu.

$getUserSelectUserIDs[(separator)]

Gets all user IDs selected via a multi-select user select menu.

$newModal[title;customId]

Creates a new modal (interactive pop-up window) with a title and a custom identifier to handle su...

$removeAllComponents

Removes all interactive components (buttons, menus, text fields, etc.) from a message in a single...

$removeButtons

Removes all buttons from a message in a single operation. Other components (menus, text fields) a...

$removeComponent[customId]

Removes a specific component (button, menu, text field, etc.) from a message using its custom ide...

$sendResponse

Sends a direct interaction response with optional ephemeral visibility. Preferred for button, sel...

HTTP & JSON

(32)
$httpAddHeader[name;value]

Adds a custom HTTP header to all subsequent HTTP requests made with $httpGet, $httpPost, $httpPut...

$httpDelete[url]

Performs an HTTP DELETE request to the specified URL and returns the response body as a string

$httpGet[url]

Performs an HTTP GET request to the specified URL and returns the response body as a string

$httpPatch[url;body?]

Performs an HTTP PATCH request to the specified URL, optionally sending a partial update body, an...

$httpPost[url;body?]

Performs an HTTP POST request to the specified URL, optionally sending a request body, and return...

$httpPut[url;body?]

Performs an HTTP PUT request to the specified URL, optionally sending a request body, and returns...

$httpResult[key?]

Retrieves the full response body of the last HTTP request, or extracts a specific field from a JS...

$httpStatus[]

Returns the HTTP status code from the most recent HTTP request made by $httpGet, $httpPost, $http...

$json[value?]

Creates a JSON object with an optional initial value. If no value is provided, an empty JSON obje...

$jsonArray[key;separator?]

Creates a JSON array from a delimited string and stores it under the specified key in the current...

$jsonArrayAppend[key;value]

Appends a value to the end of a JSON array stored under the specified key.

$jsonArrayCount[key]

Returns the number of items in a JSON array.

$jsonArrayIndex[key;index]

Retrieves the value at a specific index from a JSON array. Index is zero-based.

$jsonArrayPop[key]

Removes and returns the last item from a JSON array.

$jsonArrayReverse[key]

Reverses the order of items in a JSON array in-place.

$jsonArrayShift[key]

Removes and returns the first item from a JSON array, shifting all other elements down by one index.

$jsonArraySort[key;order?]

Sorts a JSON array alphabetically or numerically in ascending or descending order.

$jsonArrayUnshift[key;value]

Adds a value to the beginning of a JSON array, shifting all existing elements up by one index.

$jsonClear[]

Clears the current internal JSON object, resetting it to an empty state. All previously set keys,...

$jsonExists[key]

Checks whether a specified key exists in the current JSON object.

$jsonForEach[key]

Iterates over each key-value pair in the current JSON object or each element in a JSON array. Mus...

$jsonIndex[]

Returns the current iteration index during a $jsonForEach loop. Zero-based — starts at 0 for the ...

$jsonJoinArray[key;separator]

Joins all elements of a JSON array into a single string using the specified separator.

$jsonKey[]

Returns the current key during a $jsonForEach iteration. Must be called inside a $jsonForEach block.

$jsonKeys[]

Returns all top-level keys of the current JSON object as a comma-separated string. Also used with...

$jsonParse[json]

Parses a JSON string into the internal JSON structure, replacing any existing JSON context.

$jsonPretty[indent?]

Prettifies the current internal JSON structure into a human-readable, indented JSON string for di...

$jsonSet[key;value]

Sets a key to a value in the current JSON object. The value is stored as-is (string, number, bool...

$jsonSetString[key;value]

Sets a key to a string value in the current JSON object, explicitly forcing the value type to str...

$jsonStringify[]

Converts the current internal JSON structure back into a compact JSON string with no extra whites...

$jsonUnset[key]

Removes a key and its associated value from the current JSON object.

$jsonValue[key]

Retrieves the string value of a key from the current JSON object. For nested access, use dot nota...

Image & Canvas

(20)
$attachImage[name]

Finalizes the current canvas block, renders all queued operations, and registers the resulting im...

$attachImage[name;url;(spoiler)]

Attaches a remote image to the response message using a name and a URL.

$canvasChartBar[x;y;width;height;data;colors;labels?;maxValue?;barSpacing?;container?]

Draws a bar chart with automatic scaling and configurable bar spacing

$canvasChartLine[x;y;width;height;data;color;lineWidth?;fill?;showPoints?;pointRadius?;container?]

Draws a line chart with optional area fill and data point markers

$canvasChartPie[x;y;radius;data;colors;labels?;startAngle?;container?]

Draws a pie chart from semicolon-separated data values with automatic color palette fallback

$canvasCompositeImage[url;x;y;width;height;shape?;blend?;container?]

Overlays an external image at the given position with optional shape masking and blend modes

$canvasContainer[name;x;y;width;height;color?]

Defines a named positioning frame. Subsequent canvas operations referencing this container via th...

$canvasCreate[name;width;height;color?]

Creates a blank canvas with the given dimensions and optional background color

$canvasDrawArc[x;y;radius;startAngle;endAngle;color;fill?;thickness?;container?]

Draws an arc (outline) or pie slice (filled) using angle parameters in degrees

$canvasDrawCircle[x;y;radius;color;fill;blend?;container?]

Draws a circle (filled or outlined) with optional blend mode support

$canvasDrawLine[x1;y1;x2;y2;color;thickness;blend?;container?]

Draws a line between two points using Bresenham's algorithm with configurable thickness

$canvasDrawRect[x;y;width;height;color;fill;blend?;container?]

Draws a rectangle (filled or outline only) with optional blend mode

$canvasDrawRoundedRect[x;y;width;height;radius;color;fill;blend?;container?]

Draws a rectangle with rounded corners — filled or outline

$canvasDrawText[text;x;y;fontSize;color;textAlign?;maxWidth?;container?]

Draws text on the canvas at the specified position with configurable font size, color, and alignment

$canvasGrayscale

Converts the current canvas to grayscale. No parameters.

$canvasInvert

Inverts the colors of the current canvas (negative). No parameters.

$canvasLoadImage[url;x?;y?;width?;height?;container?]

Loads an image from a URL, data URL, or base64 string onto the canvas

$canvasProgressBar[x;y;width;height;value;fillColor;bgColor?;borderColor?;borderWidth?;direction?;borderRadius?;container?]

Draws a progress bar (horizontal or vertical) with background, fill, and optional border

$canvasRotate[degrees]

Rotates the canvas by a given angle in degrees.

$canvasSetPixel[x;y;color]

Sets the color of a specific pixel on the canvas.

Moderation

(88)
Blacklistrolesids

$addCmdReactions[emoji1;emoji2;...]

Adds one or more reactions to the user's command message (the message that triggered the command).

$addEmoji[name;url;(roleID)]

Adds a new custom emoji to the server from a URL. Optionally restrict the emoji to a specific role.

$addMessageReactions[channelID;messageID;emoji1;...]

Adds one or more reactions to a specific message identified by its channel and message IDs.

$addReactions[emoji1;emoji2;...]

Adds one or more reactions to the bot's response message (the message sent by the current command...

$authorPerms

Returns the list of permissions of the author of the command on the server. Useful for dynamicall...

$ban[userID;(reason);(deleteMessagesDays)]

Bans a user from the Discord server.

$banID[userID;(reason)]

Bans a user by their user ID.

$blacklistIDs[userID1;userID2;...;(errorMessage)]

Guard function that blacklists users by ID. If the triggering user is in the list, the command is...

$blacklistRoleIDs[roleID1;roleID2;...;(errorMessage)]

Guard function that blacklists roles by ID. Alias of $blacklistRoles.

$blacklistRoles[roleID1;roleID2;...;(errorMessage)]

Guard function that blacklists roles. If the user has any of the roles, the command is interrupted.

$blacklistServers[guildID1;guildID2;...;(errorMessage)]

Guard function that blacklists servers. If the command is executed on a blacklisted server, it is...

$blacklistUsers[userID1;userID2;...;(errorMessage)]

Guard function that blacklists users by ID. Alias of $blacklistIDs. The command is interrupted if...

$botLeave[(guildID)]

Makes the bot leave a server. If no ID is provided, the bot leaves the server where the command w...

$botTyping

Triggers the typing indicator in the current channel, showing users that the bot is typing.

$changeUsername[newName]

Changes the username of the bot.

$changeUsernameWithID[userID;newName]

Changes the username of a specific user (requires elevated permissions).

$channelSendMessage[channelID;content]

Sends a message in a specific channel. Unlike $sendMessage which responds in the current channel,...

$checkUserPerms[userID;permission1;permission2;...]

Checks if a user has all the specified permissions. Alias of $hasPerms. Returns "true" or "false".

$clear[amount;(userID);(removePinned)]

Deletes a specified number of messages in the channel.

$clearReactions[messageID]

Removes all reactions from a specific message. Usually requires appropriate permissions to clear ...

$closeTicket[(errorMessage)]

Closes and deletes the current ticket channel. If the channel is not a ticket, an optional error ...

$createChannel[name;(type);(categoryID);(topic);(nsfw);(slowmode)]

Creates a new channel on the server. Supports text, voice, category, announcement, and stage chan...

$createRole[name;(color);(hoist);(mentionable)]

Creates a new role on the Discord server.

$customEmoji[name;(id)]

Generates the markup of a custom emoji in the format <:name:ID> for display in a message. If the ...

$deleteChannels[channelID1;channelID2;...]

Deletes one or multiple channels by their ID. Alias: $deleteChannelsByName for deletion by name.

$deleteCommand

Deletes the user's command message (the message that triggered the command). Useful for keeping c...

$deleteRole[roleID]

Deletes a role from the Discord server.

$editChannelPerms[channelID;roleOrUserID;allow;deny]

Modifies the permissions of a role or a user on a specific channel using numerical permission val...

$editThread[threadID;name;(archived);(locked);(autoArchiveDuration)]

Modifies the properties of an existing thread: name, archive status, lock, and auto-archive durat...

$emojiCount / $emoteCount

Returns the total number of custom emojis on the current server. $emoteCount is an alias of $emoj...

$emojiExists[name]

Checks if a custom emoji with a given name exists on the current server. Returns true or false.

$emojiName[emojiID]

Gets the name of a custom emoji from its ID. Returns the name text of the emoji.

$getBanReason[userID]

Gets the ban reason of a banned user on the server. Returns the reason stored in the server's ban...

$getBotInvite[(guildID)]

Generates and returns the bot's invite link with the necessary permissions. If a guildID is provi...

$getInviteInfo[code]

Gets information about a Discord invite from its code. Returns details like the server name, numb...

$getMessage[channelID;messageID]

Gets the text content of a message specified by its channel and message ID.

$getReactions[channelID;messageID;emoji]

Returns the number of reactions for a specific emoji on a given message. Allows counting votes or...

$getRoleColor[roleID]

Gets the hexadecimal color of a Discord role. Returns the color in

$getServerInvite[(guildID)]

Generates or returns a permanent invite for the server. If no ID is provided, it creates an invit...

$giveRole[userID;roleID]

Assigns a role to a user on the server.

$giveRoles[userID;role1;role2;...]

Assigns several roles to a user in a single operation.

$hasPerms[userID;permission1;permission2;...]

Checks if a user has all specified permissions. Returns "true" or "false". Inline check, does not...

$ignoreChannels[channelID1;channelID2;...]

A function guard that silently ignores command execution if it is triggered in one of the listed ...

$ignoreLinks

A function guard that silently stops execution if the triggering message contains an HTTP/HTTPS l...

$kick[userID;(reason)]

Kicks a user from the Discord server.

$kickMention

Kicks the user mentioned in the message.

$modifyChannel[channelID;name;(topic);(categoryID);(nsfw);(slowmode)]

Modifies the properties of an existing channel, such as its name, topic, category, NSFW status, a...

$modifyChannelPerms[channelID;roleOrUserID;permissions]

Modifies the permissions of a role or user in a channel using readable permission names (sendmess...

$modifyRole[roleID;name;(color);(hoist);(mentionable)]

Modifies the properties of an existing role.

$modifyRolePerms[roleID;permissions]

Modifies the permissions of an existing role.

$mute[userID;(reason)]

Mutes a user on the server.

$newTicket[categoryID;(name);(message)]

Creates a ticket as a new text channel in a category. The creator of the ticket automatically rec...

$onlyAdmin

A guard function that stops command execution if the user is not an administrator of the server.

$onlyBotChannelPerms[permission1;permission2;...;(errorMessage)]

A guard function that stops execution if the bot does not have the specified permissions in the c...

$onlyBotPerms[permission1;permission2;...;(errorMessage)]

A guard function that stops execution if the bot does not have all specified permissions on the s...

$onlyForCategories[categoryID1;categoryID2;...;(errorMessage)]

A guard function that stops execution if the current channel does not belong to one of the specif...

$onlyForChannels[channelID1;channelID2;...;(errorMessage)]

A guard function that stops execution if the command is not executed in one of the specified chan...

$onlyForIDs[userID1;userID2;...;(errorMessage)]

A guard function that stops execution if the user's ID is not in the list of allowed IDs. Alias o...

$onlyForRoleIDs[roleID1;roleID2;...;(errorMessage)]

A guard function that stops execution if the user does not possess any of the specified roles by ...

$onlyForRoles[roleID1;roleID2;...;(errorMessage)]

A guard function that stops execution if the user does not possess any of the specified roles.

$onlyForServers[guildID1;guildID2;...;(errorMessage)]

Guard function that stops execution if the command is not used in one of the specified servers. A...

$onlyForUsers[userID1;userID2;...;(errorMessage)]

Guard function that stops execution if the user is not part of the list of authorized IDs.

$onlyNSFW

Guard function that stops execution if the current channel is not marked as NSFW.

$onlyPerms[permission1;permission2;...;(errorMessage)]

Guard function that stops command execution if the user does not have all the specified permissions.

$pinMessage[messageID]

Pins a message in the current channel. The message will appear in the channel's pinned messages l...

$publishMessage[messageID]

Publishes a message to subscribed servers (announcement channel feature). Allows broadcasting a m...

$registerGuildCommands[guildID]

Registers the bot's slash commands on a specific server. Slash commands are immediately available...

$removeEmoji[name]

Removes a custom emoji from the server by its name. The emoji will no longer be usable after remo...

$removeReaction[channelID;messageID;emoji]

Removes a specific reaction (emoji) from a given message. Useful for removing control reactions a...

$roleGrant[userID;roleID;(guildID)]

Assigns a role to a member of the server.

$setNickname[nickname;(userID)]

Modifies the nickname of a user on the server.

$setUserRoles[userID;role1;role2;...]

Sets the exact list of roles for a user, replacing all of their current roles.

$startThread[name;(autoArchiveDuration);(messageID)]

Creates a discussion thread from the current message or a specified message. Threads allow organi...

$takeRole[userID;roleID]

Removes a role from a user on the server.

$takeRoles[userID;role1;role2;...]

Removes several roles from a user in a single operation.

$threadAddMember[threadID;userID]

Adds a member to a thread. Useful for private threads where members must be added manually.

$threadMessageCount[threadID]

Returns the total number of messages in a thread. Includes messages within the thread only, not t...

$threadRemoveMember[threadID;userID]

Removes a member from a thread. The user will no longer be able to view or participate in the pri...

$threadUserCount[threadID]

Returns the number of members in a thread. Useful for tracking participation in discussions.

$timeout[userID;duration;(reason)]

Temporarily times out a user (temporary silence).

$unBan[userID]

Unbans a user from the server using their ID. The user will be able to rejoin the server with a n...

$unBanID[userID]

Unbans a user from the server using only their ID. Works similarly to $unBan but optimized for ra...

$unTimeout[userID]

Removes the timeout of a user before its expiration.

$unmute[userID]

Removes the mute of a user.

$unpinMessage[messageID]

Removes a pinned message from the pinned messages list of the channel.

$unregisterGuildCommands[guildID]

Deletes all slash commands of the bot on a specific server. Global commands are not affected.

$voiceUserLimit[(channelID)]

Gets the user limit of a voice channel. Returns the maximum number of users that can connect simu...

Math & Text

(58)
$c[expression]

Alias of $calculate. Performs a mathematical calculation and returns the result. Supports basic o...

$calculate[expression]

Evaluates a complete mathematical expression (operators, functions, comparisons).

$ceil[value]

Rounds a number up to the next integer.

$charCount[text]

Counts the number of characters in the given text.

$cropText[text;maxLength;(suffix)]

Truncates text to a maximum length and optionally appends a suffix (default: "...") when truncati...

$divide[a;b]

Divides the first value by the second (a / b). If the divisor is 0, it returns 0 instead of gener...

$editSplitText[index;newValue]

Replaces the value of a spreads element at the specified index with a new value.

$floor[value]

Rounds a number down to the nearest integer.

$getTextSplitIndex

Returns the current index during split text iteration within loops. Useful for tracking position ...

$getTextSplitLength

Returns the total number of elements in the current split text array.

$getTimestampMs

Returns the current Unix timestamp in milliseconds. Resolved at runtime.

$hasRole[userID;roleID]

Checks if a user has a specific role on the server.

$isBanned[userID]

Checks if a user is banned from the current server.

$isBoolean[value]

Checks if a value is strictly a boolean (true or false).

$isEmojiAnimated[emoji]

Checks if a custom emoji is animated.

$isInteger[value]

Checks if a value is an integer (positive, negative or zero).

$isNSFW[channelID]

Checks if a channel is marked as NSFW.

$isNumber[value]

Checks if a value is a number (integer or decimal, positive or negative).

$isSlash

Checks if the command was triggered via a slash command.

$isTicket

Checks if the current channel is a ticket channel opened with $newTicket.

$isUserDmEnabled[userID]

Checks if the private messages (DMs) of a user are open.

$isValidHex[value]

Checks if a string is a valid hexadecimal color code.

$joinSplitText[separator]

Joins all elements from the current split text back into a single string, separated by the given ...

$linesCount[text]

Counts the number of lines in the given text. Lines are separated by newline characters.

$log[value]

Calculates the natural logarithm (base e) of a number.

$max[value1;value2;...]

Returns the largest value among the provided arguments.

$min[value1;value2;...]

Returns the smallest value among the provided arguments.

$modulo[a;b]

Calculates the remainder of the division of a by b (a % b). If b = 0, returns 0.

$multi[a;b]

Multiplies two values (a * b).

$numberSeparator[number]

Formats a number by adding thousands separators (commas) for readability.

$random[min;max]

Generates a random integer between min and max (inclusive). The value is evaluated at compile-tim...

$randomCategoryID

Returns the ID of a random category from all categories on the current server.

$randomChannelID

Returns the ID of a random channel present on the server.

$randomGuildID

Returns the ID of a random server among the servers where the bot is present.

$randomMention

Returns the mention (format <@id>) of a random user present on the server.

$randomRoleID

Returns the ID of a random role present on the server.

$randomString[length]

Generates a random alphanumeric string of the specified length.

$randomText[option1;option2;...]

Randomly chooses and returns an option from a list of provided text options.

$randomUser

Returns the ID or mention of a random user present on the server.

$randomUserID

Returns the ID of a random user present on the server.

$removeContains[text]

Removes all occurrences of a string in a given text. Searches and replaces with an empty string.

$removeLinks

Removes all URLs (HTTP/HTTPS links) from a text. Useful for anti-spam moderation.

$removeSplitTextElement[index]

Removes the element at the specified index from the current split text array.

$repeatMessage[count;message]

Sends a message multiple times. The message is repeated 'count' times in the channel.

$replaceText[input;search;replacement]

Replaces all occurrences of a search string with a replacement string in the given input text.

$round[value]

Rounds a number to the nearest integer. Values ending in .5 are rounded up or according to banker...

$sort[separator;(direction)]

Sorts elements (separated by the given delimiter) and returns them as a single string.

$splitText[index]

Retrieves the element at the specified index from the most recent $textSpreads operation.

$sqrt[value]

Calculates the square root of a number.

$sub[a;b]

Subtracts the second value from the first (a - b).

$sum[value1;value2;...]

Calculates the sum of all provided values.

$textSplit[text;separator]

Splits a text string into an array using the specified separator and stores it for later access w...

$toLowercase[text]

Converts all characters in the given text to lowercase.

$toTitlecase[text]

Converts the first letter of each word to uppercase and the rest to lowercase.

$toUppercase[text]

Converts all characters in the given text to uppercase.

$trimContent[text]

Removes leading and trailing spaces from a text (trim). Does not modify spaces within the text.

$trimSpace[text]

Removes leading and trailing whitespace (spaces, tabs, newlines) from the given text.

$unEscape[text]

Converts the escape sequences in a string into their real characters. For example, \n becomes a r...

Date & Time

(9)

Music

(18)

Webhooks & Integrations

(10)

Cooldown

(2)

Permission

(1)

Flags & Debug

(7)

Meta

(6)

Misc

(11)