Bot Creator Documentation
Everything you need to build Discord bots — BDFD $functions, JavaScript scripting, and step-by-step guides.
Blocks Reference
Visual actions, payloads, results, permissions and control flow.
BrowseBDFD Function Reference
Syntax and parameters for every $function.
BrowseJavaScript API
db.*, interaction, message, and script globals for BDJS.
BrowsePublic API
Manage a bot from your own code with API keys. Premium only.
BrowseGuides & Tutorials
Step-by-step walkthroughs from token setup to advanced patterns.
BrowseGetting 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 CommandsBDFD Buttons and Select Menus: $addButton and $newSelectMenu
Building CommandsDesigning Stunning Discord Embeds in BDFD
Reference & Deployment
Advanced Topics
JavaScript API
Script globals for BDJS bots — db.*, interaction, message, and more.
Guides
(7)Create Channel, Edit Channel Permissions and Remove Channel with the real blocks of the app; explicit ticket creation...
IF / ELSE, Switch, Try / Catch, For Loop, Wait, Stop Execution and Run Workflow, with their output pins, shown with t...
Every block of the Bot Creator app as it appears in the editor, with its real name, category, fields, hints, options ...
Respond with Message versus Send Message; content, embeds, channels and interaction context, shown with the real bloc...
How the Bot Creator Blocks editor works. What a block looks like, how its fields behave, and three step-by-step proje...
Read the installed modules, their settings and the commands of the bot from a script, and let a server administrator ...
Write each message of your bot once per language, with arguments and plurals, and let every command and workflow pick...
Embed & Message
(46)Adds a field to a Discord embed. The fields help structure information as name/value pairs in the...
Shows a file attached to the message as a component (Components V2), optionally inside a container.
Adds a thumbnail component (Components V2). After $addSection it becomes the accessory of that se...
Adds the current date and time as the timestamp of a Discord embed. The optional argument is the ...
Accepted for compatibility. In the engine it does nothing.
Restricts which roles can be pinged by the message to the listed role IDs. Without any ID, no rol...
Restricts which users can be pinged by the message to the listed user IDs. Without any ID, no use...
Sets the author name of a Discord embed. The author appears at the very top of the embed, above t...
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 channel ID and its message ID.
Modifies the destination URL of the author of an embed. Makes the author's name clickable without...
In an autocomplete script, suggests every item of a list in one call (replaces one `$appendOption...
Sets the color of the left sidebar of a Discord embed. The color can be specified in hexadecimal ...
Deletes an embed field
Schedules the deletion of the command's main response after a delay (at most 40 minutes).
Deletes a specific message, identified by its channel ID and message ID.
Sets the main body (description) of a Discord embed. This is the main text area, located below th...
Disables everyone mention
Disables all role mentions
Disables all user mentions
Redirects the response of the current command to the private messages (DM) of one or several user...
Returns the DM channel ID stored in the command context for the user (variable user.dmChannelId),...
Schedules, after a delay, the replacement of the embed of the message sent by the current command...
Edits an embed field
Schedules the editing of the message sent by the current command, after a delay, with the given n...
Edits an existing message sent by the bot, or the message of the button or select menu that was j...
Sets the clickable URL of an embed's title. When the user clicks on the title of the embed, they ...
Sets the footer text of a Discord embed. The icon is set separately with $footerIcon. The footer ...
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...
A link button in one call (shortcut of `$addButton` with the `link` style).
Disables all mention notifications of the response, including mentions written on purpose.
Sends the command's main response as a reply to an existing message.
An embed in one call, instead of `$title`, `$description`, `$color` and `$footer`.
A failure message as a styled embed (❌, color `#ED4245`). `$error` is already used by the engine,...
Pauses the execution of the command for the given duration (at least 1 second, at most 40 minutes...
A information message as a styled embed (ℹ️, color `#5865F2`). `$error` is already used by the en...
A success message as a styled embed (✅, color `#57F287`). `$error` is already used by the engine,...
A warning message as a styled embed (⚠️, color `#FEE75C`). `$error` is already used by the engine...
Sends a message with an embed built from its own arguments to a specific channel. Every field aft...
Explicit message send of a separate channel message; ordinary slash replies can use text or embed...
Sends a message to the channel stored in a setting. Does nothing while the setting is empty or is...
Sets the thumbnail of a Discord embed. The thumbnail is a small square image displayed at the top...
Adds an embed timestamp
Sets the title of a Discord embed. The title appears at the top of the embed, in bold and with a ...
Sets a tts flag on the command's main response. In the current engine the flag is not read when t...
Variables
(63)Returns the number of arguments passed to the current command, or the number of words of a given ...
Reads message.content, drops its first word, and returns the remaining words joined by spaces, or...
Validates the number of arguments passed to the command and stops execution with an error message...
Writes a value only while the variable still equals the expected one, and returns `true` or `fals...
Subtracts from a number variable and returns the new value.
Deletes a local variable.
Deletes the value stored for a role (it reads as the default again).
Stops the command when its first argument is no (or false), optionally replacing the output with ...
Reads a local variable, or a key of its JSON value.
Reads a local variable set by $let.
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 rank of a user in the ranking of a stored variable (user or globalUser).
Returns the entry (name, ID or value) found at a given position in the ranking of a stored variable.
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...
Value of a variable stored for a role (one value per role of the bot). The default is returned wh...
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.
Writes the top 10 of the global user values of a variable into the description of the first embed...
Tells whether a local variable exists.
Adds to a number variable and returns the new value. An empty variable counts as 0.
Returns the value submitted for a modal input, identified by its custom ID.
Returns every value submitted for a modal field: all checked options, all selected entries or the...
Stores a value in a local variable of the script run.
Divides a local variable by a number (error when dividing by zero).
Multiplies a local variable by a number.
Subtracts a number from a local variable.
Adds a number to a local variable (0 when unset).
Returns the names of all the variables declared by the bot (all scopes and global variables), joi...
Lists the names of the global variables that start with a prefix.
Gets the content of the message with user, role and channel mentions removed, or its nth word (th...
Stops the script with a message while a setting is empty. A setting (log channel, role…) is empty...
Resets a channel-scoped variable to its declared default value (as defined in the Bot Creator Var...
Resets the value of a global-user variable to its declared default, for every user or for one use...
Resets a guild-member-scoped variable to its default value (as defined in the Bot Creator Variabl...
Resets a guild-scoped variable to its declared default value (as defined in the Bot Creator Varia...
Resets a guild-member-scoped variable to its default value (as defined in the Bot Creator Variabl...
Resets a message-scoped variable to its declared default value, for every message or for a single...
Resets a guild-scoped variable to its declared default value (as defined in the Bot Creator Varia...
Resets the member-scoped value of a variable to its declared default value, for every member or f...
Ranks the servers by the value of a server variable and writes the top 10 into the description of...
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 in a variable of a role.
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.
Flips a variable between `true` and `false` and returns the new value. An empty variable counts a...
Takes a named lock and returns `true`, or returns `false` while another script holds it. The lock...
Releases a lock taken with `$tryLock`.
Encodes or decodes a text as a URL query component.
Changes the destination channel of the messages sent by the rest of the command ($sendMessage and...
Writes the top 10 of the members of the current server, ranked by a user variable, into the descr...
Reads or writes a temporary variable scoped to the current execution. In read mode (1 parameter),...
Stops the script and displays the message if the variable name is not declared.
Checks whether a variable with the given name is declared for the bot (the variables defined in t...
Counts the number of variables declared for a given type (user, globaluser, server or channel).
Control Flow
(45)Logical AND — returns "true" only if ALL provided conditions evaluate to true.
Opens a block, closed by $endAsync, that runs at the same time as the rest of the script. $await[...
Sets the reason shown in the server's audit log for every Discord action the script runs after it...
Waits for the $async block of that name and returns the text it wrote. An error in the block is r...
Stores a pending "await" record for a user and channel. It does not suspend the script and nothin...
Leaves the innermost loop immediately.
Calls a local function
Calls another workflow by name, optionally passing arguments. The called workflow executes, then ...
Adds a switch case
Sets the labels (days, hours, minutes, seconds) used by the %time% placeholders in the error mess...
Evaluates a condition (a comparison written as a single expression) and returns "true" or "false".
Checks whether a string contains a substring and returns "true" or "false".
Skips the rest of the current iteration and goes to the next one.
Enforces a cooldown on command execution. Three variants: $cooldown (per user and server), $serve...
Acknowledges the interaction (optionally ephemeral) when the script was not acknowledged beforeha...
Replaces the error message shown when a function fails with a custom error embed built from its a...
Closes a block opened by $async[name].
Stops command execution if the given text does not end with one of the listed suffixes (case-inse...
Code inside this function will not be executed
Dynamically parses and executes a string of BibiScript code at runtime. The code is treated as a ...
Repeats a block, either once per listed value ($for[name;v1;v2;...]), a given number of times ($f...
Returns the remaining cooldown time in whole seconds (rounded up) for the current command, for th...
Alias of $loopIndex. Returns the current zero-based iteration index of the innermost loop ($for, ...
Conditional branching — executes blocks of code based on runtime condition evaluation.
Continues the current block at a given action number, skipping the actions in between. It only ju...
Defines a new local function
Returns the one-based count of the current iteration of the innermost loop.
Returns the zero-based index of the current iteration of the innermost loop.
Alias of $loopIndex. Returns the zero-based index of the current iteration of the innermost loop.
Only executes code if given ids match the guild
Condition guard that stops the script if the condition is false. An optional message replaces the...
Stops command execution if the given text does not contain all the listed words (case-insensitive...
Logical OR — returns "true" if at least one of the provided conditions evaluates to true (1 to 10...
Returns a value
Runs functions in a cloned context
Skips a specified number of subsequent actions in the current execution block.
Stops command execution if the given text does not start with one of the listed prefixes (case-in...
Immediately ends the current script. What was written before it is still sent.
Sets the "suppress error logging" flag of the script. The engine does not read this flag, so it h...
Replaces the error response of the script with a text message (or with nothing when called withou...
Switch-case statement for javascript
Error handling block — catches runtime errors in the try body and allows graceful recovery or log...
Pauses the script for a duration (positive, at most 40 minutes) before continuing.
Repeats a block as long as a condition is true. The condition is checked before every iteration.
Returns the status or a named result of the last workflow run with $callWorkflow.
Entity Info
(388)Lists the active threads of the server.
Returns the ID of the AFK channel configured on the current Discord server. Raises an error if th...
Returns the AFK timeout of the server in seconds, for the current server or for the server whose ...
Returns the total number of members summed over all the servers the bot is in (bots included). Fo...
Another name of $getApplicationEmojis: same arguments, same result.
Lists the archived threads of a text channel.
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, or an empty string if there i...
Returns the Discord ID of the author of the message that triggered the command.
Returns the server tag the author displays next to their name (for example "BCS"), or an empty st...
Returns the username of the author of the command, as supplied by the command context.
Returns the number of boosts (premium subscriptions) of the current server, or of the server whos...
Returns the boost level (tier) of the current Discord server, as reported by Discord.
Returns the names of the commands registered on the bot, joined by the separator you provide.
Returns the number of bot accounts among the members of a Discord server.
Returns the client's custom invite link
Returns the description of the bot
Returns the user ID of the bot.
Compatibility flag for the BibiScript bot list description. It takes exactly one argument and has...
Compatibility flag for the BibiScript bot list. It takes no argument and has no effect in the eng...
Returns the username of the bot (`Bot` when the context does not provide it).
Returns the node identifier supplied by the host in the context (`bot.node`), or `1` when none is...
Returns the Discord ID of the owner of the bot.
Returns the client tags
Returns the client's team creation timestamp
Returns the ID of the Discord team that owns the bot application.
Returns the client's team icon
Returns the client's team members
Returns the client's team name
Returns the user authorization count of the bot
Returns the user install count of the bot
Returns the client webhook event types
Returns the client webhook event status
Returns the client webhook event url
Calculates and returns the number of bytes of a text string. Useful for checking the size of a me...
Returns the channels belonging to a specific category (names by default, or IDs, mentions or the ...
Returns the number of categories of the current Discord server, or of the server whose ID is given.
Returns the ID of the category with the given name.
Returns the bitrate of the voice channel.
Returns the ID of the parent category of a Discord channel.
Returns the amount of children this category has.
Returns the children ids this category has.
Returns the total number of channels on the server.
Returns the channel timestamp.
Reads a channel from Discord: the whole object as JSON, or one field.
Checks if a Discord channel with the given ID exists. Returns "true" or "false".
Returns the flags of a channel.
Whether a voice channel has reached its user limit.
Returns the channel guild id.
Returns whether role or member has any of the perms in a channel
Returns whether role or member has perms in a channel
Without argument, returns the ID of the channel in which the command is executed (`none` in a DM)...
Returns the ID of a Discord channel from its name.
Returns every channel id.
Lists the invitations of a channel.
Checks whether given channel is a children of a category.
Alias of $channelVoiceMemberCount.
Alias of $channelVoiceMemberIDs.
Returns "true" if the channel is marked as NSFW, "false" otherwise.
Returns the name of a Discord channel from its ID.
Returns a list of all channel names on the server, joined by the separator you provide.
Returns specific permissions of a role or member in a channel
Returns the pinned messages of a channel.
Returns the position of a channel in the Discord channel list.
Retrieves tags from a forum thread.
Returns the thread ids of a channel.
Returns the topic of the current Discord channel, or of the channel whose ID is given.
Returns the type of a Discord channel from its ID (text, voice, category, dm, etc.).
Returns the url of a channel.
Returns the user limit of the voice channel.
Number of members connected to a voice channel.
IDs of the members connected to a voice channel.
Returns the region of a voice channel.
Sets the color of the first role mentioned in the message.
Returns the description of the command that triggered a Command Created, Command Updated or Comma...
Returns the ID of the command that triggered a Command Created, Command Updated or Command Delete...
Returns the way the command is built (`workflow`, `bdfd_script` or `javascript`) that triggered a...
Returns the name of the command (for a deletion, the name it had) that triggered a Command Create...
Returns the previous name of the command after a rename, empty otherwise that triggered a Command...
Returns the type of the command (`chatInput`, `user` or `message`) that triggered a Command Creat...
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 how the current command was invoked, taken from the execution context (chatInput, user or...
Returns the number of commands stored for the bot (all trigger types).
Returns the creation date of a Discord entity (user, server, role, channel, message, etc.) from i...
Alias of $memberCustomStatus.
Disables every possible mention.
Returns the discriminator of the given user, left-padded to 4 digits, for bot accounts; returns "...
Returns the global display name of a user (the author by default), or the username if the user ha...
Returns the number of custom emojis of the current server, or of the server whose ID is given.
Reads a custom emoji of the server from Discord: the whole object as JSON, or one field.
Enables every possible mention.
Returns the execution time of the current command in milliseconds. Helps measure BibiScript code ...
Fetches the application of the client.
Caches all channels of a guild.
Caches all members of a guild.
Caches all roles of a guild.
Caches all threads of a channel
Finds an application emoji of the client
Searches for a channel of the current server by mention, ID or name (case-insensitive, exact name...
Finds an emoji
Finds a guild
Finds a channel of a guild
Finds an emoji of a guild
Finds member of a guild using a query
Searches for a role by ID, role mention or exact name and returns its ID. Case-sensitive on names.
Searches the members of the current server for a user by mention, ID or username (case-insensitiv...
Returns the first message sent in a channel.
Returns the default layout of a forum.
Returns the default reaction emoji of a forum.
Returns the default sort order of a forum.
Returns the default auto archive duration for threads of a forum.
Returns the default slowmode for threads of a forum.
Gets all application emojis
Returns the URL of one attachment, selected by a 0-based index, of the message that triggered the...
Returns an automod rule of a guild
Returns the actions of an automod rule from a guild
Returns the custom status text supplied in the command context (user.customStatus); an empty stri...
Extracts the data of a specific field of an embed in a message. Allows reading the title, descrip...
Retrieves data of an embed, not providing any property returns embed json
Returns the preview of a guild.
Gets the data of a guild template.
Returns the total number of members on the server (including bots). Possible alias of $membersCount.
Gets the amount of users that have reacted to a specific emoji
Gets the user ids that have reacted to a specific emoji
Retrieves data of a poll from a message
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.
Retrieves data of snapshots from a message
Returns a stage instance of a guild.
Returns all members from a thread.
Returns the presence status (online, idle, dnd, offline) of the specified user.
Returns a webhook from a channel
Returns the approximated member count.
Returns the approximated presence count.
Returns all automod rules of a guild.
Returns whether the server is available.
Returns banned member ids of a guild.
Returns the URL of the banner of the Discord server whose ID is given. $serverBanner is the equiv...
Returns whether a guild has the boost progress bar enabled.
Returns the server boost role id.
Returns all current boosters of a guild.
Lists the IDs of the bot accounts of a server.
Returns every channel id of the guild.
Alias of $serverCount. Returns the total number of servers the bot is present on.
Returns the default message notifications for this guild.
Returns the guild discovery splash.
Returns when a direct message spam was detected on a guild.
Returns the direct messages disabled timestamp of a guild.
Returns whether an emoji id exists on a guild.
Returns every emoji id of the guild.
Returns the emoji limit of a guild.
Checks if a server (guild) with the given ID exists and if the bot has access to it. Returns "tru...
Returns the explicit content filter level for this guild.
Returns the features of the current server, as a comma-separated list of Discord feature codes (a...
Returns whether this guild has any of the given features.
Returns whether this guild has all the given features.
Returns whether this guild has a template.
Returns the highest role id of a guild.
Returns the unique identifier (Snowflake) of the current Discord server, or of a server of the bo...
Returns the IDs of the servers in which the bot is present (10 by default, -1 for all), separated...
Alias of $serverIcon. Returns the URL of the Discord server icon.
Returns whether a guild invite code exists.
Returns the invites disabled timestamp of a guild.
Returns whether a guild is considered as large.
Returns the lowest role id of a guild.
Returns the mfa level for this guild.
Returns the maximum video channel users for stage channels of this guild.
Returns the maximum video channel users for this guild.
Returns the maximum bitrate for voice channels of this guild.
Returns the maximum members for this guild.
Returns the maximum presences for this guild.
Returns the maximum bitrate for stage channels of this guild.
Returns all cached member ids of a guild.
Returns the nsfw level for this guild.
Alias of $serverName. Returns the name of the Discord server.
Returns the server name acronym.
Returns whether the server is partnered.
Returns the server's public updates channel ID.
Returns when a raid was detected on a guild.
Returns every role id of the guild.
Returns the server's safety alerts channel ID.
Returns the server shard ID
Returns the soundboard sound limit of a guild.
Returns all soundboard sounds of a guild.
Returns the guild splash url.
Returns whether a sticker id exists on a guild.
Returns every sticker id of the guild.
Returns the sticker limit of a guild.
Returns the system channel flags of a guild.
Returns the template code of a guild.
Returns all current timed out members of a guild.
Returns the guilds vanity uses.
Returns whether the server is verified.
Returns whether widget channel is enabled for this guild.
Returns the widget channel for this guild.
Checks whether given message has components
Checks whether given message has embeds
Checks whether given message holds a poll
Checks whether given message has snapshots
Returns the ID of the highest role of the server, or of the highest role of a given member.
Returns the ID of the highest role of the server that possesses all the specified permissions.
Returns the hosting expiration value supplied by the host application, or an empty string.
Returns the HypeSquad value supplied by the host in the user.hypesquad context variable, or an em...
Lists the integrations of the server (bots, Twitch, YouTube…).
Returns "true" if the given user has the Administrator permission on the server, and "false" othe...
Returns whether a member is bannable
Returns "true" if the user is a server booster (Nitro Boost), and "false" otherwise.
Returns "true" if the user (the author by default) is a bot, and "false" otherwise.
Returns whether the bot is verified.
Returns whether a channel was mentioned in this message
Returns whether a member is deafened.
Returns whether a member is server deafened.
Returns whether a member is server muted.
Returns "true" if the role is displayed separately in the member list, "false" otherwise.
Returns whether a member is kickable
Returns whether a member is manageable
Checks if a role is mentionable. Returns "true" or "false".
Returns "true" if the given user ID is among the users mentioned in the message, "false" otherwise.
Checks if a message was edited. Returns "true" or "false".
Returns whether a member is moderatable
Returns whether a member is muted.
Returns whether a role was mentioned in this message
Returns whether a member is self deafened.
Returns whether a member is self muted.
Returns whether the channel is a thread.
Returns whether the channel is a thread-only channel.
Returns "true" if the given user is currently timed out (temporarily muted) on the server, "false...
Returns whether a user was mentioned in this message
Returns whether a member is verified.
Returns the ID of the last message sent in the current channel.
Returns the Unix timestamp (in seconds) of the last pinned message in the current channel.
Returns the ID of the lowest role of the server, or of a given member. @everyone is the lowest ro...
Returns the ID of the lowest role of the server (in the role hierarchy) that possesses all the sp...
Runs math expression, returns nothing if incorrect expression.
Returns the member's avatar decoration.
Returns when the member started boosting the guild.
Returns the managed bot role of a member, only available for bots.
Returns the total number of members (users + bots) on the Discord server.
Custom status text of the user who ran the command. Empty for another user.
Reads a member from Discord: the whole object as JSON, or one field.
Returns the display color of a member.
Returns true when the user is a member of the current server (or of the given server), false othe...
Returns the flags of a member.
Returns the highest role id of a member.
Returns the Discord ID of the member who triggered the command (member.id, else the author ID).
Returns the position at which the member joined the guild
Returns the lowest role id of a member.
Returns the nickname of a member on the server, falling back to a display name or username when n...
Returns the permissions of the triggering member as supplied by the host in the member.permission...
Alias of $status.
Alias of $status.
Returns the total number of members on the Discord server, or only those with a given presence. W...
Returns the ID of the user mentioned at the given position in the message (1, < for the first, > ...
Returns the mentioned channel count
Returns the ID of the channel mentioned at the given position in the message (1, < for the first,...
Returns the mentioned role count
Returns the ID of the role mentioned at the given position in the message (1, < for the first, > ...
Returns the mentioned user count
Returns the list of all user IDs mentioned in the message, separated by commas.
Returns the text that follows the command, or one of its words, or the value of a named slash-com...
Retrieves an attachment from this message
Retrieve the amount of attachments in this message
Returns the flags of an attachment from this message
Retrieves all attachments of this message
Reads a message: the whole object as JSON, or one field.
Returns the Unix timestamp (in seconds) of the last edit of a message, or an empty string if it h...
Retrieves all emojis of this message
Returns whether given message id exists
Returns the flags of a message
Returns the ID (snowflake) of the message that triggered the command.
Returns the message id that this message replies to
Retrieves a sticker url of this message
Retrieves sticker count of this message
Retrieves all stickers of this message
Returns the creation timestamp of the triggering message (host-supplied, milliseconds for 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 message's webhook id
Returns the server nickname of a user, or their display name (global name, else username) if they...
Returns the version string supplied by the host in bot.nodeVersion, or v20.0.0 when the host supp...
Reads the onboarding settings of the server.
Returns the online member count supplied by the host in guild.onlineMembers or, when there is non...
Alias of $channelCategoryID. Returns the ID of a channel's parent category.
Another name of $channelPinnedMessages: same arguments, same result.
Another name of $getPoll: same arguments, same result.
Returns the premium expiration value supplied by the host in premium.expireTime, or an empty string.
Returns a random emoji ID of the application
Returns the ID of the message that a given message replies to. Without argument, uses the message...
Returns the total number of roles on the Discord server.
Returns the role creation date.
Reads a role from Discord: the whole object as JSON, or one field.
Returns whether the role is editable by the bot
Checks if a role exists on the server. Returns "true" or "false".
Returns the role flags.
Returns whether the role has any of the specified perms.
Returns whether the role has all specified perms.
Returns the ID of a Discord role from its exact name in the current server.
Writes the information of the first role mentioned in the message into the embed description, usi...
Returns the role color as int.
Returns whether the role is managed by discord
Lists the members of the current server who have a role, as IDs, mentions or usernames.
Returns the name of a Discord role from its ID.
Returns the list of all role names of the current server, separated by commas.
Returns the permissions of a Discord role as a text list.
Returns the hierarchical position of a role in the server's role list.
Returns the role raw position.
Returns all role tags.
Returns the unicode emoji used by the role.
Returns the ID of the rules channel of the server. Raises an error when the server has no rules c...
Returns the scripting language of the interpreter running the script.
Another name of $findMembers: same arguments, same result.
Returns the URL of the banner of the current server, or of the server whose ID is given. Empty st...
Returns the number of active Nitro boosts on the Discord server.
Checks if a channel (or active thread) with a given name or ID exists on the current server. Retu...
Returns the total number of servers the bot is present in.
Reads a server from Discord: the whole object as JSON, or one field.
Returns the description of the current Discord server, or of the server whose ID is given.
Returns the list of custom emojis of a Discord server, joined by a separator.
Tells whether the bot can see the server with the given ID.
Returns the server features list supplied by the host in the guild.features context variable, or ...
Returns the unique identifier (Snowflake) of the Discord server where the command was executed.
Returns the IDs of the servers in which the bot is present (10 by default, -1 for all), separated...
Returns the URL of the icon of the current Discord server, or of the server whose ID is given.
Returns the runtime value `guild.info` of the current context, or an empty string when none is pr...
Lists the invitations of the server.
Returns the name of the server (guild) in which the command is executed.
Returns the names of the servers in which the bot is present (10 by default, -1 for all), separat...
Returns the identifier (ID) of the owner of the current Discord server, or of the server whose ID...
Returns the server region supplied by the host in the guild.region context variable, or an empty ...
Recreates the roles and channels of a $serverSnapshot that are missing, and returns a JSON report...
Returns the structure of a server as JSON (roles, categories, channels and their permissions). No...
Returns the invite splash value supplied by the host in the guild.splash context variable, or an ...
Returns the vanity URL code supplied by the host in the guild.vanityUrlCode context variable, or ...
Returns the verification level of the server as a label (None, Low, Medium, High, Very High).
Returns the shard of the bot, or the shard that serves the given server.
Returns the number of global slash (chat input) commands registered on Discord for the bot.
Returns the Discord ID of the slash command being executed, or of the global slash command with t...
Sets the slowmode delay of a Discord channel (write function). To read the current value, use $ge...
ID of the server of the sound of the current soundboard event.
Another name of $guildSoundboardSounds: same arguments, same result.
Presence status (online, idle, dnd, offline) of the user who ran the command. Empty for another u...
Alias of $status.
Returns the sticker count supplied by the host in the guild.stickerCount context variable, or 0.
Reads a sticker from Discord: the whole object as JSON, or one field.
ID of the sticker of the current sticker event.
Returns the identifier (ID) of the system messages channel configured on the Discord server (welc...
Returns whether a thread is archived.
Returns whether a thread is locked.
Another name of $getThreadMembers: same arguments, same result.
Returns the owner of the thread.
Returns the id of the message that started this thread.
Chooses the server the rest of the run acts on, even when it starts from a private message. Not i...
Returns the accent color of a user.
Returns the global avatar URL of a user. For the author of the command, use $authorAvatar.
Returns the URL of the avatar decoration of a user, or an empty string if they have none. Bot Cre...
Returns the badge names of a user (the author by default), separated by a space unless a separato...
Returns the URL of the profile banner of a user. For the author of the command, use $authorBanner.
Returns the banner color of a user in hexadecimal format (RRGGBB, without
Alias of $memberCustomStatus.
Reads a user from Discord: the whole object as JSON, or one field.
Returns the default user avatar.
Checks if a user ID can be resolved by the bot and returns "true" or "false". Only numeric IDs ar...
Returns the primary guild tag badge of a user.
Returns whether the primary guild of a user is enabled.
Returns the primary guild id of a user.
Returns the primary guild tag name of a user.
Returns the Discord ID of the user of the execution context, or of the server member found by use...
Formats the information of the first mentioned user (or of the author) into the description of th...
Returns the date when a user joined the current Discord server, formatted with a Go time layout.
Returns the creation date of a Discord account (the registration date on the platform), derived f...
Returns the global Discord username of the user who triggered the command, or of the user whose I...
Returns the permissions granted to a user by their roles on the current server, as a list of names.
Checks if a specific user reacted with a given emoji on a message. Returns true or false.
Returns the id of the user this message replies to
Returns the names of the roles assigned to the user on the current server, one per line.
Returns the URL of the member's server-specific avatar, or their global avatar if none is set. Th...
Returns the URL of the avatar decoration of the member's server profile, or an empty string if th...
Returns the URL of the member's server profile banner, or an empty string if they have none. Bot ...
Returns the server tag a user displays next to their name (for example "BCS"), or an empty string...
Returns the IDs of the members of the current server who have a role, joined by a separator (defa...
Another name of $channelVoiceMemberIDs: same arguments, same result.
Another name of $channelVoiceMemberCount: same arguments, same result.
Checks whether given webhook id exists
Checks whether given webhook is user created
Returns the type of a webhook
Reads the welcome screen of a community server.
Components & Interactions
(125)Starts a new action row for buttons.
Adds an action row (or rows) to a message
Adds an interactive button to a message (legacy style).
Adds an interactive or link button to the response, in the current action row or a chosen one.
Creates a channel select menu
Creates a channel select menu on a message
Adds channel types to the last select menu
Adds a new checkbox component to the newest modal label
Adds a new checkbox group component to the newest modal label
Adds an option to a checkbox group of the modal being built. An empty menuId targets the last che...
Adds a new option to the newest checkbox group component
Adds an autocomplete choice
Starts a Components V2 container that groups the components added after it, with an optional acce...
Adds default channel options to the last select menu
Adds default role options to the last select menu
Adds default user options to the last select menu
Adds a new file upload component to the newest modal label
Adds a field to the modal that lets the user upload one image.
Adds a new label component to the modal
Starts a Components V2 media gallery. Images are added with $addMediaGalleryItem[].
Adds an element (image) to a media gallery. If galleryId is omitted, the element is added to the ...
Adds a new media gallery item
Creates a mentionable select menu
Creates a mentionable select menu on a message
Adds an individual checkbox to the modal being built.
Creates a checkbox group in the modal being built. The individual options are added using $addChe...
Adds a file upload component (Components V2) to the modal being built.
Creates a group of radio buttons in the modal being built. Options are added using $addRadioGroup...
Adds a select menu (Components V2) to the modal being built. Options are added with $addSelectMen...
Displays a static informational text in a modal. This component is not interactive — it only serv...
Adds a Components V2 text input (wrapped in a label) to the modal being built. The style defaults...
Adds a select menu option
Adds a new radio group component to the newest modal label
Adds an option to a radio button group of the modal being built. An empty menuId targets the last...
Adds a new option to the newest radio group component
Creates a role select menu
Creates a role select menu on a message
Starts a section: text displays that can have a thumbnail. The text displays and the thumbnail ad...
Adds a button as the accessory of the open section (Components V2): the button sits on the side o...
Preselects a user, a role or a channel in a select menu added earlier in the script.
Adds a string select dropdown menu to a message.
Creates a string select menu
Creates a string select menu on a message
Adds a classic text input to the modal being built with $newModal[]. The style must be "short" or...
Creates a user select menu
Creates a user select menu on a message
Adds one suggestion to the answer of an option autocomplete script. Only usable in that script.
Returns the name of the option being typed in an autocomplete script.
Returns the text typed so far in the option, inside an autocomplete script.
Returns the custom ID (customId) of the interaction component that triggered the callback (button...
Deletes an action row or top level component at given index
Deletes a message component with given custom id
Disables all buttons on the current message
Disables all components on the current message
Modifies an existing button on a message. Replaces the label, style, disabled state, and emoji of...
Edits a channel select menu
Changes the accent color and the spoiler state of the n-th container of a Components V2 message.
After a delay, replaces the components of the response of the command with the Components V2 layo...
Edits a mentionable select menu
Replaces every component of a message sent by the bot with the Components V2 layout built before ...
Edits a select menu option
Edits a role select menu
Modifies the properties of an existing string select menu: placeholder text, minimum and maximum ...
Modifies an individual option in an existing string select menu.
Edits a string select menu
Replaces the content of the n-th text display of a Components V2 message, in the response being b...
Replaces the n-th thumbnail of a Components V2 message (URL, description and spoiler).
Edits a user select menu
Enables all buttons on the current message
Enables all components on the current message
Closes the open section (Components V2): the next text display is a sibling of the section instea...
Makes the response visible only to the user who triggered the interaction.
Returns the focused option of the command
Returns the focused option value of the command
Returns how many values were selected in a channel 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 ...
Returns how many values were selected in a mentionable select menu.
Gets one selected ID of the mentionable select menu that triggered the interaction. When users ar...
Gets all the IDs selected in a mentionable select menu, joined by a separator. When users are sel...
Returns how many values were selected in a role select 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.
Returns how many values were selected in a string select 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.
Returns how many values were selected in a user 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.
Returns whether the interaction is an activity command
Returns whether the context is a select menu
Returns whether the interaction is autocomplete
Returns whether the interaction is a button
Returns whether the context is a channel select menu
Returns whether the interaction is a command
Returns whether the interaction is a context menu
Returns whether the context is a mentionable select menu
Returns whether the interaction is a message component
Returns whether the interaction is a message context menu
Returns whether this interaction can be replied to
Returns whether the context is a role select menu
Returns whether the interaction is a slash command
Returns whether the context is a string select menu
Returns whether the interaction is a user context menu
Returns whether the context is a user select menu
Creates a modal
Creates a new modal (interactive pop-up window) with a title and a custom identifier to handle su...
Returns an option value with given name (interaction command)
Removes all components from the response being built, or from an existing message sent by the bot.
Removes all buttons from the response being built, or from an existing message sent by the bot. O...
Removes a specific component from the response being built or from an existing message, using its...
Removes one option, identified by its value, from a string select menu.
Returns select menu values
Sets channel types for the last select menu
HTTP & JSON
(45)Builds a query string from name and value pairs.
Sets a header for the next HTTP request made with $httpGet, $httpPost, $httpPut, $httpPatch, $htt...
Sends an HTTP DELETE request (optionally with a body), stores the response for $httpStatus and $h...
Sends an HTTP GET request to the URL, stores the response for $httpStatus and $httpResult and ret...
Returns the value of a header of the response to the latest HTTP request.
Sends an HTTP HEAD request to a URL and keeps the response for $httpStatus.
Sends an HTTP PATCH request with an optional body, stores the response for $httpStatus and $httpR...
Sends an HTTP POST request with an optional body, stores the response for $httpStatus and $httpRe...
Sends an HTTP PUT request with an optional body, stores the response for $httpStatus and $httpRes...
Removes a header added with $httpAddHeader before the next HTTP request is sent.
Returns the body of the last HTTP response, or the JSON value found by following the given keys; ...
Returns the numeric HTTP status code of the most recent HTTP request (made with $httpGet, $httpPo...
Reads an HTTP header received by an inbound webhook
Reads a field of the JSON body received by an inbound webhook
With one argument starting with { or [, replaces the current JSON document and returns an empty s...
Converts the string stored at a path of the current JSON document into an array by splitting it o...
Appends a value to the end of the JSON array at a path of the current document; creates the array...
Returns the number of items in the JSON array at a path of the current document, or 0 if the valu...
Returns the position (zero-based) of a value in the JSON array at a path of the current document,...
Removes and returns the last item of the JSON array at a path of the current document; a missing ...
Reverses, in place, the JSON array at a path of the current document; a missing or non-array valu...
Removes and returns the first item of the JSON array at a path of the current document; a missing...
Sorts, in place, the JSON array at a path of the current document, ascending by default or descen...
Adds a value to the beginning of the JSON array at a path of the current document; creates the ar...
Empties the current JSON document, back to the state before any $jsonParse or $jsonSet, and retur...
Checks whether a path exists in the current JSON document and returns true or false (a key whose ...
Iterates over each key-value pair of the object, or each element of the array, found at a path of...
Converts an array of entries into an object
Builds a JSON object without any quote to escape.
Returns the zero-based index of the current element during a $jsonForEach loop; an empty string o...
Joins the elements of the JSON array at a path of the current document into a string with the giv...
Returns the key of the current element during a $jsonForEach loop (the index for an array); an em...
Returns the keys of the JSON object at a path of the current document, joined by a separator (def...
Loads JSON to an env variable
Parses a JSON string into the current JSON document, replacing it; invalid JSON or a scalar gives...
Returns the current JSON document as indented, multi-line JSON text; the indent defaults to 2 spa...
Sets the value at a path of the current JSON document, creating missing levels; numbers, booleans...
Sets the value at a path of the current JSON document as a string, without converting numbers, bo...
Returns the current JSON document as compact JSON text; empty if no JSON document exists yet.
Removes a key (or array element) and its value from the current JSON document. With no argument, ...
Returns the value at a path of the current JSON document (one argument per level); inside $jsonFo...
Closes a WebSocket source. Returns an empty string
Opens a WebSocket source declared on the bot's WebSocket page and plays its join sequence. Return...
Sends a text message on an open WebSocket source. Returns an empty string
Returns closed, connecting, open or error for a WebSocket source
Image & Canvas
(166)Decodes a GIF from an image URL or data URL (at most 200 frames are kept). (alias of $newGIFDecoder)
Returns an option of a GIF decoder: bgColor, bufferSize, globalPalette, lineLength, loops.
Returns an option of a GIF decoder: bgColor, bufferSize, globalPalette, lineLength, loops. (alias...
Returns the size of a GIF decoder: width, height or JSON.
Returns a global palette (red, green, blue values, JSON) computed from the first frame.
Returns the size of a GIF encoder: width, height or JSON.
Returns the RGB color map of the sample (JSON). (alias of $colorMapRgb)
Returns the RGBA color map of the sample (JSON). (alias of $colorMapRgba)
Finds the index of the closest color of the color map.
Returns the color [r, g, b, a] at an index of the color map.
Returns the pixel mapped to the closest color of the color map, as [r, g, b, a] (nothing is chang...
Creates a NeuQuant color quantizer from RGBA pixels (sample 1 to 30, 2 to 256 colors). (alias of ...
Adds a color stop (offset 0 to 100) to a gradient; with an empty name, to the next gradient created.
Adds a frame (a created frame, or a source) to the GIF encoder.
Sets or returns the horizontal alignment (left, center, right) of the rectangles and images drawn...
Sets or returns the horizontal alignment (left, center, right) of the rectangles and images drawn...
Adds a circular arc to the current path (angles in radians).
Adds a circular arc between two tangents to the current path.
Attaches the canvas to the reply as a PNG.
Attaches the GIF of an encoder to the response, as name.gif.
Renders a canvas created with $canvasCreate and attaches the PNG to the response; the canvas name...
Renders a canvas created with $canvasCreate[] and attaches it to the response as a PNG image name...
Adds a data segment (value 0 to 100 and style) to the next progress bar or pie chart.
Sets progress bar options as key:value: type (normal, pie), draw-type (fill, stroke), background-...
Starts a new, empty path.
Adds a cubic Bézier curve to the current path.
Stores the canvas as base64 in a variable read with $env[name].
Draws an image from a URL, data URL or base64 text on the current canvas, optionally resized, cli...
Defines a named container: later canvas functions that name it in their container argument have t...
Creates a canvas with the given name, size and optional background color; the following canvas fu...
Crops the transparent borders of a canvas (each side can be kept with false). (alias of $cropCanvas)
Returns the canvas as a data URL (png, jpeg or gif).
Draws a circle (filled or 1-pixel outline) on the current canvas, with an optional blend mode and...
Fills a rectangle of the current canvas with a gradient of two to four colors.
Draws a line between two points on the current canvas, with a thickness, an optional blend mode a...
Draws a rectangle (filled or 1-pixel outline) on the current canvas, with an optional blend mode ...
Draws text on the current canvas at a position, with a font size, color and optional alignment in...
Converts the current canvas to grayscale. One optional argument is accepted and ignored.
Inverts the colors of the current canvas (negative). One optional argument is accepted and ignored.
Loads an image from a URL, data URL or base64 text; it replaces the canvas when placed at 0,0 wit...
Draws a progress bar (horizontal or vertical) with a track, a fill, a centered percentage label a...
Rotates the current canvas clockwise by an angle in degrees; the canvas grows to hold the result....
Sets the color of one pixel of the current canvas. Coordinates outside the canvas are ignored.
Returns the size of a canvas, or its width or height.
Fills a grid of square tiles in one call, for a mini-map.
Crops the transparent borders of a canvas (each side can be kept with false). (alias of $cropCanvas)
Returns the name of the canvas engine.
Accepted for compatibility (kept in the options). (alias of $checkFrameConsistency)
Accepted for compatibility (kept in the options).
Accepted for compatibility (kept in the options).
Forgets the images named by $loadImage.
Limits what is drawn next to the inside of the current path (up to 8 nested clips; save/restore k...
Closes the current subpath with a straight line to its start.
Returns the RGB color map of the sample (JSON).
Returns the RGBA color map of the sample (JSON).
Sets or returns how what is drawn next blends: source-over, multiply, screen, overlay, darken, li...
Creates a canvas and makes it the current one; the optional code runs right away.
Decodes a GIF from an image URL or data URL (at most 200 frames are kept). (alias of $newGIFDecoder)
Creates a named GIF frame from a canvas name, an image URL or a data URL. Options JSON: delay (hu...
Decodes a GIF from an image URL or data URL (at most 200 frames are kept). (alias of $newGIFDecoder)
Creates a named GIF frame from a canvas name, an image URL or a data URL. Options JSON: delay (hu...
Creates a NeuQuant color quantizer from RGBA pixels (sample 1 to 30, 2 to 256 colors). (alias of ...
Crops the transparent borders of a canvas (each side can be kept with false).
Converts a decimal color (0 to 16777215) into a six-digit uppercase hexadecimal code, without #.
Creates a named set of GIF decode options.
Returns an option of a GIF decoder: bgColor, bufferSize, globalPalette, lineLength, loops. (alias...
Creates a named set of GIF decode options. (alias of $decodeOptions)
Returns an option of a GIF decoder: bgColor, bufferSize, globalPalette, lineLength, loops. (alias...
Returns the size of a GIF decoder: width, height or JSON. (alias of $GIFDecoderSize)
Deletes a canvas.
Deletes a GIF decoder.
Deletes a GIF encoder.
Deletes a created frame.
Forgets an image loaded with $loadImage (or, with preload://name, one of $preloadImage).
Draws an image (a name from $loadImage or a source) on a canvas, with an optional corner radius.
Draws one area of an image (crop) on the canvas; not available after a transform.
Draws one area of an image (crop) on the canvas; not available after a transform. (alias of $draw...
Draws a progress bar (or a pie chart with type:pie) from $barData and $barOptions.
Draws a rectangle (type fill or stroke) with an optional corner radius.
Adds an elliptical arc to the current path (angles in radians).
Returns a global palette (red, green, blue values, JSON) computed from the first frame. (alias of...
Returns the size of a GIF encoder: width, height or JSON. (alias of $GIFEncoderSize)
Fills the current path (each subpath on its own; holes are not handled).
Filters applied to what is drawn next: methods add, set, remove, clear, get, json, setRaw. Filter...
Lists the fonts the canvas can draw (Geist, Geist-Medium, Geist-Bold).
Sets or returns the capitals of the text drawn next: normal, or small-caps, all-small-caps, petit...
Accepted for compatibility (kept in the options). (alias of $checkFrameConsistency)
Returns an option of a created frame: delay, dispose, transparent, needsUserInput, top, left, wid...
Returns an option of a created frame: delay, dispose, transparent, needsUserInput, top, left, wid...
Returns an option of a created frame: delay, dispose, transparent, needsUserInput, top, left, wid...
Returns an option of a created frame: delay, dispose, transparent, needsUserInput, top, left, wid...
Returns the pixels of an area (at most 40000) as a JSON array: Rgba (default, four numbers per pi...
Returns the pixels of an area (at most 40000) as a JSON array: Rgba (default, four numbers per pi...
Returns the transform of a canvas as [a, b, c, d, e, f].
Returns an option of a created frame: delay, dispose, transparent, needsUserInput, top, left, wid...
Returns a global palette (red, green, blue values, JSON) computed from the first frame. (alias of...
Returns the blue component (0 to 255) of a six-digit hexadecimal color.
Returns the green component (0 to 255) of a six-digit hexadecimal color.
Returns the red component (0 to 255) of a six-digit hexadecimal color.
Converts a six-digit hexadecimal color, with or without #, into a decimal integer.
Sets or returns the horizontal alignment (left, center, right) of the rectangles and images drawn...
Sets or returns the vertical alignment (top, center, bottom) of the rectangles and images drawn n...
Stores an image as base64 in a variable read with $env[name].
Returns the size of an image (URL, data URL, images://name or preload://name): width, height or J...
Returns the size of an image (URL, data URL, images://name or preload://name): width, height or J...
Sets or returns whether scaled images are smoothed (true) or drawn pixel by pixel (false). (alias...
Sets or returns whether scaled images are smoothed (true) or drawn pixel by pixel (false).
Returns the size of an image (URL, data URL, images://name or preload://name): width, height or J...
Converts palette indexes to hex colors (JSON array).
Converts palette indexes to red, green, blue, alpha values (JSON array).
Sets or returns the spacing in pixels between letters of the text drawn next.
Sets or returns the dash segments of a canvas, as a JSON list like [5, 3].
Sets or returns the dash offset of a canvas.
Sets or returns the line join of a canvas (round, bevel, miter).
Adds a straight line to the current path.
Sets or returns the line width of a canvas.
Gives a name to an image source (URL or data URL) for $drawImage; 32 names at most.
Sets or returns the image load options (alt, maxRedirects); kept for compatibility, the loader ig...
Returns the pixel mapped to the closest color of the color map, as [r, g, b, a] (nothing is chang...
Starts a new subpath at a point.
Creates a conic gradient around a point, to use by name as the style of $fill or $drawRect.
Decodes a GIF from an image URL or data URL (at most 200 frames are kept). (alias of $newGIFDecoder)
Creates a named GIF frame from a canvas name, an image URL or a data URL. Options JSON: delay (hu...
Decodes a GIF from an image URL or data URL (at most 200 frames are kept).
Creates a GIF encoder (at most 4, 512x512, 60 frames). Palette and functions are accepted by Forg...
Creates a named GIF frame from a canvas name, an image URL or a data URL. Options JSON: delay (hu...
Creates a linear gradient, to use by name as the style of $fill or $drawRect (shapes only).
Creates a NeuQuant color quantizer from RGBA pixels (sample 1 to 30, 2 to 256 colors).
Creates a radial gradient between two circles, to use by name as the style of $fill or $drawRect.
Reads the next frame without its pixels: returns its info as JSON and keeps it in $env[name].
Sets or returns the opacity (0 to 1) applied to what is drawn next (not to images).
Draws one area of an image (crop) on the canvas; not available after a transform. (alias of $draw...
Names an image source for the whole execution; draw it with preload://name (at most 32).
Places pixels (JSON array, Rgba or Hex) in an area of the canvas without blending. (alias of $put...
Places pixels (JSON array, Rgba or Hex) in an area of the canvas without blending.
Adds a quadratic Bézier curve to the current path.
Reads the next frame with its pixels into $env[name] (an object with delay, dispose, width, heigh...
Sets or returns the horizontal alignment (left, center, right) of the rectangles and images drawn...
Sets or returns the vertical alignment (top, center, bottom) of the rectangles and images drawn n...
Deletes a GIF decoder. (alias of $deleteDecoder)
Deletes a GIF encoder. (alias of $deleteEncoder)
Deletes a created frame. (alias of $deleteFrame)
Forgets an image loaded with $loadImage (or, with preload://name, one of $preloadImage). (alias o...
Resets the transform of a canvas.
Resizes a canvas; as in ForgeCanvas, the canvas is emptied (transparent).
Restores the last saved transform and line settings.
Adds a rotation (radians) to the transform of a canvas.
Saves the transform and line settings of a canvas (64 states at most).
Adds a scaling to the transform of a canvas.
Sets the colors of the frames read: Rgba, IndexedPixels (read as Rgba) or Hex.
Sets how many times the GIF loops (0: forever).
Sets the memory limit of a set of decode options (kept, the decoder has its own limits).
Sets the colors of the frames read: Rgba, IndexedPixels (read as Rgba) or Hex. (alias of $setColo...
Places pixels (JSON array, Rgba or Hex) in an area of the canvas without blending. (alias of $put...
Sets the memory limit of a set of decode options (kept, the decoder has its own limits). (alias o...
Sets the transform of a canvas.
Sets or returns the shadow of what is drawn next (color, blur 0 to 100, offsetX, offsetY); pass a...
Sets or returns the shadow of what is drawn next (color, blur 0 to 100, offsetX, offsetY); pass a...
Reads frames without their pixels. (alias of $skipFrameDecoding)
Reads frames without their pixels.
Strokes the current path with the line width, dash and transform of the canvas.
Sets or returns the text alignment of a canvas (left, right, center, start, end).
Sets or returns the text baseline of a canvas (top, hanging, middle, alphabetic, ideographic, bot...
Multiplies the transform of a canvas by a matrix.
Crops the transparent borders of a canvas (each side can be kept with false). (alias of $cropCanvas)
Sets or returns the spacing in pixels between words of the text drawn next.
Moderation
(250)Another name of $addApplicationEmoji: same arguments, same result.
Adds an application emoji, returns the emoji id
Adds a button component to the newest row in a message
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 an image URL. The third argument (yes/no) chooses whet...
Adds a tag to a forum or media channel (20 tags at most).
Adds one or more reactions to a specific message identified by its channel and message IDs.
Adds tags to a forum post, returns bool.
Adds one or more reactions to the bot's response message (the message sent by the current command...
Adds a super reaction from the bot to a specific message.
Returns the list of permissions of the command's author as supplied by the execution context (low...
Bans the first mentioned user with an optional reason.
Returns the number of users banned from a server. Bot Creator function, not in BibiScript.
Bans a user ID, with the reason as the first argument. In a prefix command, an omitted ID falls b...
Guard function that blacklists users by ID. If the triggering user ID is in the list, the command...
Guard function that blacklists roles by name. If the user has any of the roles, the command is in...
Guard function that blacklists roles by ID. If the user has any of the roles, the command is inte...
Guard function that blacklists roles by ID. If the user has any of the roles, the command is inte...
Guard function that blacklists servers. If the command is executed on a blacklisted server, it is...
Guard function that blacklists users by username. The command is interrupted if the username of t...
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.
Bans up to 200 users at once, even if they are not in the server.
Changes the server nickname of the first user mentioned in the message (the command author if nob...
Changes the server nickname of the user whose ID is given.
Counts the messages sent in a channel recently, without reading their text.
Sends a text message in a specific channel. Unlike $sendMessage which responds in the current cha...
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.
Deletes all permission overwrites from the channel or given id, returns bool
Deletes recent messages of a channel (1000 at most, in batches of 100) and returns how many were ...
Removes all reactions, or all reactions of one emoji, from a specific message.
Deletes recent messages of one user in a channel (1000 at most) and returns how many were removed.
Clones the given channel's perms to another channel, returns bool
Clones an existing role of a guild, returns role id if success.
Deletes the current channel if its name contains "ticket"; otherwise returns the error message an...
Creates a new channel on the server. Supports text, announcement, voice, category, stage, forum a...
Creates a post (a thread with a first message and tags) in a forum or media channel.
Creates template for a guild, returns template code
Creates an invite to a channel and returns its code.
Creates a new role on the Discord server.
Creates a new stage instance, returns instance id.
Returns the markup of a custom emoji in the format <:name:ID> for display in a message. The emoji...
Deletes an action row or top level component at given index
Deletes all reactions from a message, returns bool
Another name of $deleteApplicationEmojis: same arguments, same result.
Deletes application emojis, returns the count of emojis deleted
Deletes some permission overwrites from a channel, returns bool
Deletes one or multiple channels by their ID (at least one ID required). $deleteChannelsByName is...
Deletes the user's command message (the message that triggered the command). Useful for keeping c...
Deletes a message component with given custom id from a message
Deletes all emoji reactions from a message, returns amount of reaction emojis successfully deleted
Deletes given emojis from a guild, returns the count of emotes deleted.
Another name of $deleteForumTags: same arguments, same result.
Deletes tags from a forum, returns bool
Deletes template from a guild, returns bool
Removes an integration from the server.
Revokes an invite.
Another name of $clearMessages: same arguments, same result.
Deletes a role from the Discord server.
Deletes a stage instance, returns bool.
Deletes given stickers, returns the count of stickers deleted.
Deletes user emoji reaction from a message, returns bool
Disables all buttons of a message, returns bool
Disables all components of a message, returns bool
Disconnects a member from their voice channel.
Edits an application emoji, returns bool
Edits an automod rule on a guild, returns bool
Edits a button component of a message
Modifies the permissions of a role or a user on a specific channel using permission names prefixe...
Edits a channel select menu of a message, returns bool
Edits an existing forum tag, returns bool
Edits template on a guild, returns bool
Edits a mentionable select menu of a message, returns bool
Edits a role's name, returns boolean.
Edits a role's position, returns boolean.
Edits a role select menu of a message, returns bool
Edits a role's unicode emoji, returns boolean.
Edits a stage instance, returns bool.
Edits a string select menu of a message
Modifies the properties of an existing thread: name, archive status, auto-archive duration, lock,...
Edits a user select menu of a message, returns bool
Formats given emoji.
Returns the author id of an emoji.
Returns the number of custom emojis of a server. $emojiCount accepts an optional server ID; $emot...
Returns the emoji creation timestamp.
Checks if a custom emoji with a given ID exists on the current server or on another server of the...
Returns the emoji guild id.
Returns the emoji id.
Returns the emoji identifier.
Gets the name of a custom emoji from its ID.
Returns whether the emoji requires colons.
Returns the role ids that can use this emote.
Returns the emoji url.
Enables all buttons of a message, returns bool
Enables all components of a message, returns bool
Another name of $deleteStageInstance: same arguments, same result.
Caches all application emojis of the client.
Follows given announcement channel, returns webhook id
Returns a custom emoji ready to send in a message, from its ID.
Lists the tags of a forum or media channel as `id:name`.
Forwards a message to another channel, returns bool
Gets the ban reason of a banned user on the server. Returns the reason stored in the server's ban...
Returns the bot's invite link (scopes bot and applications.commands, with the configured permissi...
Gets a property of a Discord invite from its code or link (channel, server, inviter, member count...
Gets the content, author, link, type, flags, counts… of a message specified by its channel and me...
Lists the latest messages of a channel and returns one value per message (its ID by default).
Returns the list of the users who reacted to a message with a given emoji, separated by the chose...
Gets the hexadecimal color of a Discord role. Returns the color as six uppercase hexadecimal digi...
Gets the icon of a role, as an image URL or a Unicode emoji. Empty when the role has no icon. Bot...
Gets the secondary color of a Discord role (six uppercase hexadecimal digits), or an empty string...
Gets the tertiary color of a Discord role (six uppercase hexadecimal digits), or an empty string ...
Returns the server invite link supplied by the host in the context (guild.invite); it does not cr...
Returns the users who super-reacted to a message with a given emoji, joined by the chosen separator.
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...
Guard function that stops command execution if it is triggered in one of the listed channels.
Accepted for compatibility with BibiScript scripts; in this engine it does nothing and returns an...
Reads an invitation from Discord by code or link.
Lets a member speak on a stage channel (or `no` to make them a listener again). Without a user, a...
Returns true if the name of a channel (the current one by default) contains "ticket", false other...
Makes the bot join a thread.
Kicks a specific user from the Discord server.
Kicks the first user mentioned in a prefix command.
Makes the bot leave a thread.
Changes the profile of the bot in this server: nickname, avatar, banner and bio.
Modifies the properties of an existing channel, such as its name, topic, NSFW status, position, a...
Deprecated variant of $editChannelPerms that takes one or several permissions (+ allow, - deny, /...
Changes several settings of a forum channel in one call.
Modifies tags of a forum post, returns bool.
Modifies the properties of an existing role.
Toggles the listed permissions of an existing role.
Changes several settings of a voice channel in one call.
Moves a member who is in a voice channel to another voice channel.
Grants a role, identified by its name, to the user(s) mentioned in the message (role-based mute).
Creates a private ticket channel for the command author, sends an optional message in it, and ans...
A guard function that stops command execution if the author is not an administrator of the server...
A guard function that stops execution if the bot does not have the specified permissions in a giv...
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.
A guard function that stops execution if the user does not possess any of the specified roles, co...
A guard function that stops execution if the user does not possess any of the specified roles (co...
Guard function that stops execution if the command is not used in one of the specified servers.
Guard function that stops execution if the username of the user is not in the list.
Guard function that stops execution if the current channel is not marked as NSFW, optionally send...
Guard function that stops command execution if the user does not have all the specified permissions.
Another name of $setGuildDmsDisabled: same arguments, same result.
Another name of $setGuildPausedInvites: same arguments, same result.
Pins a message from its channel and message ID. Without argument, pins the message sent by the cu...
Removes the members who were inactive for the given days. The bot needs Kick Members.
Counts the members who would be removed by `$prune` (inactive for the given days).
Publishes a message of an announcement channel to the servers that follow it.
Returns a random emoji ID.
Returns a random emoji ID of a guild.
Returns how many reactions a message has for an emoji, normal, super or both, without listing the...
Registers the bot's local-only slash commands on the current server, all of them or only those na...
Removes all attachments from a message, returns bool
Removes a custom emoji from the current server by its ID.
Removes all reactions of a given emoji from a given message. Useful for removing control reaction...
Removes the bot's own super reaction from a message.
Another name of $deleteUserMessageReaction: same arguments, same result.
Another name of $setRoleColors: same arguments, same result.
Adds and removes several roles of a user in one call, each role ID being prefixed by + (add) or -...
Another name of $setRoleIcon: same arguments, same result.
Searches the messages of the server for a text and returns one value per message found.
Server-deafens or undeafens a member in voice.
Server-mutes or unmutes a member in voice.
Sets the reason for audit log entries.
Sets the bot avatar on a guild
Sets the bot banner on a guild
Sets the bot description on a guild
Sets the bot name.
Modifies a channel's archive duration.
Sets a forum's default layout of posts.
Sets a forum's default reaction emoji for posts.
Sets a forum's default sort order of posts.
Sets a forum's default auto archive duration of posts.
Sets a forum's default slowmode for posts.
Sets the AFK channel for a guild, returns bool.
Sets the AFK timeout for a guild, returns bool.
Sets a guild banner, returns boolean.
Sets a guild boost progress bar, returns bool.
Sets the default message notifications setting for a guild, returns bool.
Sets the discovery splash for a guild, returns bool.
Sets the guild's DMs activity disabled for a specific duration, returns bool
Sets the explicit content filter for a guild, returns bool.
Sets a guild icon, returns boolean.
Sets the guild's invites disabled for a specific duration, returns bool
Sets the MFA level for a guild, returns bool
Sets a guild name, returns boolean.
Sets a guild paused invite status, returns bool
Sets the preferred locale of a guild, returns bool.
Sets the public updates channel for a guild, returns bool.
Sets the rules channel for a guild, returns bool.
Sets the safety alerts channel for a guild, returns bool.
Sets a guild splash, returns boolean.
Sets the system channel for a guild, returns bool.
Sets the verification level of a guild, returns bool.
Sets the widget settings of a guild, returns bool
Sets the flags of a member. Discord only lets bots change `BypassesVerification`.
Modifies the nickname of a user on the server.
Sets tags to a forum post, returns bool.
Sets the colors of a role, including the gradient and holographic styles of servers with 3 boosts...
Sets or removes the icon of a role (servers with boost level 2). Bot Creator function, not in Bib...
Another name of $editRolePosition: same arguments, same result.
Sets a sticker's description, returns bool.
Sets a sticker's name, returns bool.
Sets a sticker's tags, returns bool.
Sets a thread's auto archive duration.
Replaces the tags of a forum post.
Sets the exact list of roles for a user, replacing all of their current roles.
Sets the bitrate quality of a voice channel, returns bool.
Deafens a member from voice channel.
Mutes a member from voice channel.
Sets the region of a voice channel, returns bool.
Sets the status text shown under a voice channel name. An empty status clears it.
Undeafens a member from voice channel.
Unmutes a member from voice channel.
Sets the video quality of a voice channel, returns bool.
Reads the topic of a stage, or changes it when a new topic is given.
Another name of $createForumPost: same arguments, same result.
Another name of $createStageInstance: same arguments, same result.
Creates a discussion thread from the current message or a specified message. Threads allow organi...
Starts typing in a channel.
Suppresses embeds on a message, returns bool
Syncs this template to the current state of the guild, returns bool
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 the banned user whose username matches the text of the message. The user will be able to r...
Unbans a user from the server using their ID. If no ID is given, the last word of the message is ...
Removes the timeout of a user before its expiration.
Removes a role, identified by its name, from the user(s) mentioned in the message (role-based unm...
Removes a pinned message from the pinned messages list of the channel.
Deletes the slash commands of the bot on the current server, all of them or only those named. Glo...
Unsuppresses embeds on a message, returns bool
Checks if a specific user super-reacted with a given emoji on a message. Returns true or false.
Another name of $voiceID: same arguments, same result.
Returns the voice channel id a member is connected to.
Kicks a member from a voice channel, returns bool.
Moves a member from a voice channel, returns bool.
Returns the user limit recorded for the channel of the current command (0 when there is none). Th...
Edits a webhook message, returns bool
Math & Text
(127)Absolute value of a number.
Replaces several texts in one call.
Split and get all at the same time multiple times
Average of the given numbers, as a real decimal whatever `$enableDecimals` says.
Converts a number between bases 2 and 36.
Divides integers of any size (integer division).
Multiplies integers of any size.
Subtracts integers of any size.
Adds integers of any size.
Comment: the text between the brackets is never evaluated and the function returns an empty strin...
Evaluates an arithmetic expression with + - * / % ^ and parentheses. Not supported: functions (si...
First letter in upper case, the rest in lower case.
Rounds a number up to the next integer.
Returns the UTF-16 code of the character at an index (NaN when out of range).
Counts the number of characters in the given text.
Keeps a number between a minimum and a maximum.
Cosine of an angle in radians, as a real decimal.
Truncates text to a maximum length and appends a suffix when truncation occurs.
Decodes a full URL.
Decodes a URL part.
Compresses given input
Divides the first value by the following ones, from left to right. A divisor equal to 0 raises an...
Replaces the element at the given 1-based position of the current split text (made by $textSplit)...
Returns every emoji found in a text, in order: Unicode emojis and custom emojis.
Encodes a full URL (keeps `:/?#&=`).
Encodes a URL part (also encodes `:/?#&=`).
Adds a backslash before `* _ ~ ` | > \` so a user text is shown as typed and not formatted.
Returns every number found in a text, in order, negative and decimal numbers included.
Rounds a number down to the nearest integer.
Integer division rounded down (towards negative infinity).
Builds text from UTF-16 character codes.
Greatest common divisor of two or more whole numbers.
Returns the position (starting at 1) of a value in the elements produced by the last $textSplit, ...
Returns the total number of elements in the current split text, as produced by the last $textSplit.
Returns the current Unix timestamp in milliseconds.
Checks if a user has a specific role on the server.
Deterministic digest of a text: the same text always gives the same result.
Converts a hexadecimal value to a number.
Converts HEX colors to a list of RGB values.
Converts HEX colors to a list of RGBA values.
Decompresses given input
Converts a number to hexadecimal.
Checks if a user is banned from the current server.
Checks if a value is one of the boolean words true, false, yes, no, on, off, enable or disable (l...
Checks if a custom emoji, given by its ID, is animated.
Tells whether a number has a decimal part.
Checks if a value is an integer (positive, negative or zero) that fits in a 64-bit signed integer.
Checks if a channel is marked as NSFW.
Checks if a value is a finite number (decimal, scientific notation, or 0x/0b/0o prefixed integer).
Checks if the command was triggered via a slash command.
Returns the DM-enabled flag of the user in the execution context ("true" by default).
Checks if a string consists only of hexadecimal digits, with an optional leading
`true` when a whole number is even.
`true` when a whole number is odd.
Joins all elements from the current split text back into a single string, separated by the given ...
Least common multiple of two or more whole numbers.
Counts the lines of a text, i.e. the number of line breaks (LF) plus one. An empty text is an error.
Compares two texts: -1, 0 or 1.
Records a message in the execution log, with an optional level (success, info, warning or error)....
Logarithm of a positive number, natural by default. (`$log` is already used for logs.)
Returns the largest value among the provided arguments.
Largest integer a double represents exactly.
MD5 digest of a text.
Returns the smallest value among the provided arguments.
Smallest integer a double represents exactly.
Remainder that is never negative for a positive divisor.
Calculates the remainder of the integer division of a by b (a % b). Dividing by 0 is an error.
Multiplies two or more values.
Formats an integer by inserting a separator (comma by default) between groups of three digits.
Completes a text up to a length, for example `7` → `007`.
Reads the decimal number at the start of a text, ignoring what follows.
Reads the whole number at the start of a text, ignoring what follows.
Percentage that `part` makes of `total`.
The number pi (3.141592653589793). No brackets.
Raises a number to a power.
Generates a random number between min (inclusive) and max (exclusive); without arguments, a rando...
Random bytes as hexadecimal (0 to 1024 bytes).
Returns the ID of a random category of the current server, or of the server given as an argument.
Returns the ID of a random channel of the current server.
Returns the ID of a random server among the servers where the bot is present.
Returns the mention (format <@id>) of a random member of the server.
Returns the ID of a random role of the current server, or of the server given as an argument.
Generates a random alphanumeric string of the specified length.
Randomly chooses and returns an option from a list of provided text options.
Returns the username of a random member of the server.
Returns the ID of a random member of the server.
Removes all occurrences of a string in a given text. Searches and replaces with an empty string.
Returns a text without its http:// and https:// links. Without argument, it is a flag that remove...
Removes the element at the given 1-based index from the current split text. An index out of range...
Returns the given text repeated count times (0 to 10), with nothing between the copies. It does n...
Replaces text matching a regular expression.
Replaces occurrences of a search string with a replacement string in the given input text. By def...
Writes the text backwards.
Converts groups of three RGB values to a list of HEX colors.
Converts groups of four RGBA values to a list of HEX colors.
Rounds a number to the nearest integer, or to a given number of decimal places. Values ending exa...
Random integer that is the same for the same seed (procedural generation).
Creates an array on given text using segmenter
Groups the thousands of an integer of any size.
SHA-256 digest of a text.
SHA-512 digest of a text.
Sign of a number: `1`, `-1` or `0`.
Sine of an angle in radians, as a real decimal.
Turns a text into a link or name safe form: lower case, no accent, words joined by `-`.
Generates a unique Discord snowflake.
Sorts the given numbers in ascending or descending order and returns them joined by a separator.
Retrieves the element at the given 1-based index (or < for the first, > for the last) from the mo...
Joins all elements from array with given separator
Calculates the square root of a number.
Subtracts the following values from the first one (a - b - c ...).
Calculates the sum of all provided values.
Tangent of an angle in radians, as a real decimal.
Splits a text at every occurrence of a separator and stores the pieces for later access with $spl...
Converts text to camelCase.
Converts text to kebab-case.
Converts all characters in the given text to lowercase.
Converts text to snake_case.
Converts the first letter of each word to uppercase and the rest to lowercase.
Converts all characters in the given text to uppercase.
Converts a text such as `416`, ` 416 ` or `"416"` into a number.
Removes leading and trailing whitespace from a text and collapses repeated spaces into one. Witho...
Removes leading and trailing whitespace (spaces, tabs, newlines) from the given text.
Removes the decimal part without rounding (`-3.9` becomes `-3`). The text version is `$truncate`.
Shortens a text so that it never exceeds a length, suffix included. `$cropText` is the older equi...
Returns the type of a value: string, number, boolean, bigint, object or undefined.
Returns its text unchanged. Its only effect is inside $randomText, where semicolons in the text b...
Number of words (blocks of text separated by spaces or new lines).
Lists & Helpers
(76)Sorts with code that compares two items `a` and `b` and returns a number.
Item at an index (negative counts from the end).
Empties an array.
Joins several arrays; stores the result in another array, or returns JSON when the first argument...
Creates an array (up to 100000 items), empty or filled with blanks.
Tells whether a condition is true for every item.
Sets every item of an array to a value.
Keeps the items for which a condition is true.
First item for which a condition is true.
Index of the first item for which a condition is true (-1 if none).
Last item for which a condition is true.
Index of the last item for which a condition is true (-1 if none).
Runs code once per item; `$env[variable]` holds the current item.
Tells whether an array contains a value.
Index of the first item equal to a value (-1 when absent).
Joins the items with a separator (default `, `).
Index of the last item equal to a value (-1 when absent).
Number of items of an array.
Loads an array from text split by a separator.
Builds an array from the result of code run on each item.
Removes and returns the last item.
Appends items to an array.
Appends JSON values (numbers, objects, lists) to an array.
A random valid index (-1 for an empty array).
A random item.
Folds an array to one value: the code returns the new accumulator.
Reverses an array; stores the result in another array or returns JSON.
Removes and returns the first item.
Shuffles an array in place.
A part of an array; stores it in another array or returns JSON.
Tells whether a condition is true for at least one item.
Sorts an array in place (text by default, `asc` or `desc` for numbers) and returns JSON, or store...
Removes items from an index and optionally inserts others; returns the removed items as JSON.
Removes duplicates; stores the result in another array or returns JSON.
Deletes an array.
Adds items at the start of an array.
Adds JSON values at the start of an array.
Returns `true` with the given probability. `$chance[25]` is true one time out of four.
Tells whether the text contains every word of a list.
Tells whether the text contains at least one word of a list. Replaces many `$checkContains` calls.
Gives the value, or the fallback when the value is empty. Also available as `$ifEmpty`.
Builds a Discord dynamic timestamp (`
Writes a number of seconds in a readable way.
Alias of `$default`: the value, or the fallback when it is empty.
Inline condition: returns one of two values. Only the chosen one is evaluated.
Tells whether a number is between two bounds (both included).
Tells whether a name or a JSON text is an array.
Level reached with a given amount of XP. Reverse of `$xpForLevel` and the same formulas.
Adds an item at the end of a list and returns the new list.
The average of a list of numbers. An empty list gives an empty text.
Counts the items of a list. An empty list has 0 items.
First item of a list, or empty.
Gets one item of a list. Position 1 is the first item, -1 the last.
Tells whether a list contains an item (exact match).
Position of an item in a list (1 is the first), or 0 when it is absent.
Changes the separator of a list. This keeps IDs from getting mixed up: turn `1,2,3` into one item...
Last item of a list, or empty.
Applies a template to each item. `{item}` is the item and `{index}` its position (starting at 1).
The largest number of a list of numbers. An empty list gives an empty text.
The smallest number of a list of numbers. An empty list gives an empty text.
Writes a list as a sentence: `a, b and c`.
Removes every occurrence of an item and returns the new list.
Reverses the order of a list.
Keeps the items between two positions (both included).
Sorts a list alphabetically (not case sensitive) or by number.
The sum of a list of numbers. An empty list gives an empty text.
Removes duplicates and keeps the first occurrence of each item.
Builds the mention of a channel from its ID (`<#ID>`).
Builds the mention of a role from its ID, so you do not have to type `<@&ID>`.
Builds the mention of a user from their ID (`<@ID>`).
Tells whether a value equals one of the options.
Turns a written duration (`1h30m`, `2d`, `45s`) into a number of seconds.
Picks the singular or the plural form for a number.
Draws a progress bar with text characters, with no image.
Picks one item at random, the heavier the weight the likelier it is (drops, lotteries).
Total XP needed to reach a level.
Server Helpers
(23)Age of a Discord account, computed from the user ID (no request is made).
Tells whether the bot can give or take a role: it must have Manage Roles (or Administrator) and i...
Tells whether a sanction on a member is possible by the role hierarchy: the actor AND the bot mus...
Creates a copy of a channel and returns the ID of the new one: same type, topic, age restriction,...
Makes the permissions of a role identical to those of another role. Only the differing permission...
Lists the IDs of the roles that have a permission, from the highest role to the lowest. Gives an ...
Lists the IDs of the roles that do NOT have a permission. The opposite of `$getRolesWithPerm`.
Gives a role to a member, found by its name (not case sensitive).
Tells whether a member has every role of a list.
Tells whether a member has at least one of several roles. `$hasRole` only tests one.
Tells whether a member has a role, found by its name (not case sensitive).
Denies viewing the channel for a role, a member or `@everyone`.
Tells whether an account is younger than a number of days. Anti-raid guard.
Tells whether a user owns the server.
Denies sending messages (and messages in threads) for a role, a member or `@everyone`.
Number of members that have a role, without listing their IDs.
Removes that denial for a role, a member or `@everyone`.
Takes a role from a member, found by its name.
Times out a member for a written duration, with an optional reason in the audit log.
Gives the role if the member does not have it, takes it away otherwise. Handy for role menus and ...
Removes that denial (the channel goes back to its category / server settings) for a role, a membe...
Mentions (`<@&ID>`) of the roles a member holds, ready to display in an embed.
Names of the roles a member holds, from the highest to the lowest, without `@everyone`.
Date & Time
(17)Returns the calendar day
Returns the calendar week
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 creation date of any Discord ID (snowflake) as a Unix timestamp, in seconds or millis...
Returns the current Unix timestamp in seconds (default), milliseconds or nanoseconds.
Returns the current hour (0 to 23), in UTC or in the timezone set with $time.
Returns the current minute (0 to 59), in UTC or in the timezone set with $time.
Returns the English name of the current month (January to December), in UTC or in the timezone se...
Parses valid ms to a date
Parses valid duration string to ms
Returns the current second (0 to 59), in UTC or in the timezone set with $time.
Sets the timezone for time functions
Sets the timezone (TZ database name) used by the date and time functions of the rest of the comma...
Unparses given date to ms
Unparses given digital format to ms
Returns the current year (e.g., 2026), in UTC or in the timezone set with $time.
Music
(64)Removes the upcoming tracks and returns how many were removed
Forgets the tracks already played.
Total duration of the current track, in milliseconds.
Clears the queue and stops the music.
Disables every audio filter.
Enables every audio filter (Bassboost_low, Bassboost, Bassboost_high, Subboost, Treble, 8d, Vapor...
Sources that $playMusic and $searchMusic understand: YouTube, YouTubeMusic, SoundCloud and Spotify.
Disabled audio filters, separated by commas.
Enabled audio filters, separated by commas.
Loop mode of the queue: OFF, TRACK or QUEUE.
Get the current volume of the music player.
Whether the server has a track playing or queued.
Whether an audio filter is enabled.
Returns true when the music player of the server is paused.
Whether a track is playing (not paused).
Always false: the history is kept.
Whether no track was played yet.
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–200, default 100)
Leaves the current voice channel
Destroys the current voice connection.
Moves an upcoming track to another position and returns its title
Moves a queued track to a new position (0 is the next track).
Pauses the current music playback
Pauses the current track (alias of $pauseMusic).
Plays a track from a search query or URL, auto-joining a voice channel if needed
Moves on to the next track in the queue (same as $skipMusic).
Plays the previous track again (the last one of the history); the current track goes back to the ...
Plays a track by query in a voice channel (the other ForgeMusic arguments are ignored).
Elapsed time of the current track, in milliseconds.
Lists the queued tracks, one line each.
Time left to play the current track and the queue, in milliseconds.
Lists the tracks already played, oldest first.
Number of tracks already played.
Returns the length of the current guild queue.
Removes an upcoming track and returns its title
Removes the queued track at a position (0 is the next track).
Resumes music playback if it was previously paused
Resumes a paused track (alias of $resumeMusic).
Searches for tracks without playing them and returns a JSON list
Searches tracks without queuing them: JSON list of title, author and url.
Seeks to a specific position in the currently playing track
Seeks the current track: a time in milliseconds (15000) or with a unit (15s).
Sets the loop mode: off, track or queue.
Sets the looping mode for music playback
Sets the music playback volume to a level between 0 and 200
Sets the volume (0 to 200).
Shuffles the tracks still waiting in the queue
Shuffle the current guild queue.
Skips the currently playing track and plays the next track in the queue
Jumps to the queued track at a position (0 is the next track): the tracks before it are dropped.
Skips the current track (alias of $skipMusic).
Stops music playback and clears the entire queue
Stops playback (alias of $stopMusic).
Toggles audio filters: Bassboost_low, Bassboost, Bassboost_high, Subboost, Treble, 8d, Vaporwave,...
Information of the current track: title, author, duration (ms), position (ms) or volume.
Puts the upcoming tracks back in the order they had before the last $shuffleQueue.
Webhooks & Integrations
(11)Changes the avatar of the Discord webhook from an image URL.
Stages the color of the sidebar of the embed for the next message sent to this webhook with $webh...
Stages the text content of the message for the next message sent to this webhook with $webhookSend.
Creates a new webhook in a specified channel and returns its URL. The created webhook can then be...
Deletes an existing Discord webhook from its URL.
Stages the description (body) of the embed for the next message sent to this webhook with $webhoo...
Stages the footer text of the embed for the next message sent to this webhook with $webhookSend.
Sends a plain text message through a webhook, in one call (`$webhookSend` for embeds).
Sends a message (text and/or embed) through a Discord webhook, merging it with the data staged by...
Stages the title of the embed for the next message sent to this webhook with $webhookSend.
Renames the Discord webhook.
AI
(8)Asks the AI model a question and returns its answer. Uses your AI credits.
Asks the AI, which can call the functions you list as tools. Uses your AI credits.
Asks the AI a yes/no question about a content and returns true or false. Uses your AI credits.
Asks the AI a yes/no question about the message that triggered the command. Uses your AI credits.
Returns the error code of the last AI function call, empty if it worked.
Returns the AI credits left on the account that owns the bot.
Like `$ai`, with the context of the message that triggered the command. Uses your AI credits.
Translates a text into a language with the bot AI (costs credits). The text is treated as data, n...
Cooldown
(5)Sets a cooldown on the command that is per user and shared by all servers.
Runs a script only once per user, per server or for everybody. Later uses are refused. Not in Bib...
Hands back a cooldown claimed with $cooldown, $serverCooldown or $globalCooldown. Not in BibiScript.
Re-arms a $onlyOneTime so it can run again. Not in BibiScript.
Sets a per-server cooldown for a command.
Permission
(4)Lists the effective permissions of a member or a role in one channel, with the channel overwrites...
Lists the effective permissions of a member or a role in one channel. Same function as $channelPe...
Returns true when the @everyone role holds all the listed permissions in a channel, which tells a...
Flags & Debug
(8)Accepted for compatibility with BibiScript scripts; in this engine it does nothing and returns an...
Accepts exactly one argument and returns an empty string; in this engine it has no other effect.
Accepted for compatibility with BibiScript scripts; in this engine it does nothing and returns an...
Accepted for compatibility with BibiScript scripts; in this engine it does nothing and returns an...
Enables or disables decimal results in calculations for the current command. By default, results ...
Makes the trigger of a prefix command case-insensitive in BibiScript. Accepted in Bot Creator, wh...
Returns a positive log quota value (1000 unless the execution context supplies one), so quota che...
Accepted for compatibility with BibiScript scripts; in this engine it does nothing and returns an...
Meta
(2)Misc
(11)Reads the error caught by the last $try / $catch block, or one of its details.
Defines a reusable user function (name and parameters) that is called later with $funcCall.
Ends a function block started with $func.
Repeats a block of actions a given number of times. Legacy alias of $for with the same three forms.
Returns the value of the bot.ping context variable (latency in milliseconds), or 0 when the host ...
Returns the elapsed time since the bot started, formatted as HH:MM:SS.