Foreword

✨ Imagine An App...

...That makes building Discord Bots easy, with beginner-friendly functions. That's capable of developing nearly all types of bots - from simple echo bots, to advanced multi-purpose administration ones. Where simplicity meets functionality and scalability, that's Bot Designer for Discord.

What are you waiting for? Create the bot of your dreams today!

Start with Bot Designer for Discord


πŸ““ Wiki

Welcome to our humble abode. The thing you're seeing is Bot Designer for Discord's wiki.

πŸ“‚ Wiki Index

Changelog

2022

September

  • Added channelID field to $awaitFunc[]
  • Added $trimContent

August

  • Added $scriptLanguage
  • Fixed $stop breaking $if[]
  • Renamed $customImage[] argument to Custom image tag
  • Added $hypesquad[]
  • Added $dmChannelID[]
  • Fixed the app's max choices limit
  • Fixed $registerGuildCommands[] removing previously registered commands
  • Fixed $reply not working in DMs
  • Made it possible to return milliseconds and nanoseconds in $getTimestamp
  • Fixed $addTextInput[] not verifying max length
  • Fixed $url[] returning an error when no input was provided
  • Added $userServerAvatar[]
  • Fixed $cropText[] not supporting unicode
  • Not putting required slash command options on top no longer breaks the commands

July

  • Added hex to the color picker
  • Fixed $executionTime not working inside embed fields
  • App now sends notification when bot hosting is expired
  • Added $sendNotification[] for premium bots
  • Made it possible to use only one option in a select menu
  • Fixed $editChannelPerms[]
  • Fixed verification of slash command names
  • Fixed $sort not working with -1 as return amount

June

  • Fixed $onlyBotChannelPerms[]
  • Fixed description verification in $addSelectMenuOption[] and $editSelectMenuOption[]
  • Updated limits of select menu options
  • Fixed updating components which are refering to $messageID

May

  • Fixed token issues
  • Fixed disappearing slash command options
  • AllowedMentions field is now used in $channelSendMessage[], $sendEmbedMessage[] and $sendMessage[]
  • Fixed black screen after bot creation
  • Fixed in-app tutorial
  • Fixed escaping response in interactions
  • Fixed cooldown error messages
  • Fixed empty values in variables not getting saved
  • Fixed userID being ignored when guildID was passed to $getUserVar[]

April

  • Added "return ID of the ticket message" argument to $newTicket[]
  • Fixed disappearing slash commands from the app's state

March

  • If you're getting Invalid permissions error on your invite link, disable Stream and View guild insights permissions in the invite editor.
  • Added $toTitleCase[]
  • Fixed invite permission calculator
  • Fixed $suppressErrors[] and $embedSuppressErrors[] getting ignored by components errors
  • Fixed updating some components
  • Added $registerGuildCommands[]
  • Added $unregisterGuildCommands[]
  • Added /callback_list, /callback_tag_list, and /callback/:callback_tag endpoints to public BDFD API

February

  • $httpResult[] can return JSON now
  • Fixed $httpResult[] not working with multiple requests
  • Saving a command in the webapp no longer restarts the bots
  • Optimized slash commands resynchronization
  • Fixed custom images not working after saving a command
  • Made it possible to escape \ by using \\
  • Removed user permission check for $ban[], $banID[], $unban[] and $unbanID[]
  • Added $newModal[]
  • Added $addTextInput[]
  • Added $input[]
  • Deprecated $channelIDFromName[], use $channelID[] instead
  • Added $onlyForCategories[]
  • Fixed $modifyChannelPerms[] ignoring last permission
  • Added $onAutoComplete[] callback
  • Added $autoCompleteOptionName
  • Added $autoCompleteOptionValue
  • Added $appendOptionSuggestion[]

January

  • Added $unescape[]
  • Added a neutral permission (/<perm>) to $modifyChannelPerms[]
  • Added stop bot button in the app
  • Added restart bot button in the app
  • Added $editChannelPerms[] (replacement for the deprecated $modifyChannelPerms[])
  • Added $roleGrant[] (replacement for the deprecated $giveRole[] and $takeRole[])
  • Fixed component functions inside $async[] scope
  • Increased the limit of http functions in one command to 5
  • Fixed $userPerms[]
  • Fixed some bugs regarding math commands
  • Added public BDFD API
  • Added $serverDescription[]

2021

December

  • Saving a command no longer causes the bot to restart
  • Fixed $noMentionMessage[] in BDScript 2
  • Added $timeout[] and $untimeout[]
  • $mute[] and $unmute[] has been marked as deprecated
  • Added guildID argument to $getUserVar[] and $setUserVar[]
  • Fixed the issue with some bots not starting with invalid intents enabled
  • Fixed the role cache
  • Slash command's option description is now required
  • Added $shardID[]
  • Added sharding
  • Improved interaction handling
  • Added $defer
  • Fixed getting invites
  • Added debug information inside the app for translators
  • Fixed $serverNames
  • Added % (modulo) to $calculate[]
  • Fixed removing custom images
  • Added missing permissions
  • Fixed unintentional server restarts
  • The last argument in $replaceText[] is now optional

November

  • Added $reply[]
  • Added $trimSpace[]
  • Added $url[]
  • Upgraded the database
  • Sped up the node starting time
  • Added $botCommands[]
  • Added $unpinMessage[]
  • Added $pinMessage[]
  • Fixed $isUserDMEnabled[] not returning false in some cases
  • $addReactions[] now works in slash commands
  • $dm[] now can dm to more than one mention and can be used multiple times
  • $dm now can be used with $dm[]
  • $random[] now can use decimals
  • Added $'randomChannelID (BDScript Unstable only)
  • Fixed $textSplit[] removing space

October

  • Added $deleteMessage[]
  • Added $hostingExpireTime[]
  • Added timestamp option to $premiumExpireTime
  • Fixed $isUserDMEnabled[]
  • Fixed image parameter in $sendEmbedMessage[] and $webhookSend[]
  • Fixed caching issue for $serverIcon
  • Made it possible to use empty labels in the buttons
  • New UI
  • Added search bar in the variables section
  • Made it possible to use https://youtu.be/ URL in the streaming statuses
  • Added $getTextSplitIndex[]
  • Added $serverChannelExists[]
  • Fixed $changeUsername[] $changeUsernameWithID[] not working on the current bot
  • Made $ephemeral work with the buttons
  • Fixed global variables not getting saved
  • Fixed $deletecommand not getting catched by $try block
  • Made it possible to open function's wiki article from the functions list

September

  • Updated ToS
  • Fixed $executionTime not working in embeds
  • Added $botNode
  • Added $isBanned[]
  • Fixed a problem with $charCount[] having problems with unicode
  • Added $channelType[]
  • Added $async[] block function and $endasync
  • Added $await[]
  • Added $sort[]
  • Added $userPerms[]
  • Added $serverNames[]
  • Improved variables lookup time

August

  • Added $webhookTitle[]
  • Added $webhookDescription[]
  • Added $webhookFooter[]
  • Added $webhookContent[]
  • Added $webhookUsername[]
  • Added $webhookAvatarURL[]
  • Added $webhookCreate[]
  • Removed permission check from $deleteChannelsByName[]
  • Removed permission check from $deleteChannels[]
  • Removed permission check from $createChannel[]
  • Fixed the issue with bots not working in threads
  • Added $startThread[]
  • Added $webhookColor[]
  • Fixed optional field in $getServerVar[]
  • Fixed floating points in $onlyIf[] conditions
  • Added $webhookDelete[]
  • Added $webhookSend[]
  • Removed permission check from $modifyChannelPerms[]
  • Made it possible to use multiple $onInteraction[]s
  • Added $onInteraction callback (without [])
  • Added $customID
  • Made it possible to use different scripting languages in callbacks
  • Added $editThread[]
  • Added $threadAddMember[]
  • Added $threadRemoveMember[]
  • Added $getEmbedData[]
  • Made it possible to use block functions ($if[], $try, etc.) inside function arguments in BDScript 2
  • Fixed preprocessor failures in some corner cases in BDScript 2
  • Fixed a bug with block-functions adding extra new line in BDScript 2
  • Fixed and optimised $setVar[]
  • Added $sendEmbedMessage[]
  • Fixed condition parsing in $if[] for the normal BDScript and BDScript Unstable (BDScript 2 didn't have any issues)
  • Made command saving faster

July

  • Added $getTimestamp
  • Added support for decimals in the math functions
  • Added $newSelectMenu[]
  • Added $addSelectMenuOption[]
  • Added $editSelectMenu[]
  • Added $editSelectMenuOption[]
  • Added $removeComponent[]
  • Added $calculate[]
  • Added $round[]
  • Added $enableDecimals[]
  • Added $nickname
  • Added row and column information in BDScript 2 errors
  • Fixed the issue with BDScript 2 not requiring ]
  • Adjusted the optimizer in BDScript 2
  • Added $onlyForRoleIDs[]
  • Added $getCooldown[]
  • Fixed problems with ] in some functions
  • Fixed component functions inside $eval[] function
  • Fixed minor bugs inside BDScript 2 parser
  • Fixed author ID not showing up in $mentioned[..;yes]
  • Fixed $serverNames which removed two last characters
  • Fixed $addTimestamp[] when used for multiple embeds
  • Added limits for the $round[] function (max decimal place)
  • Added $and[]
  • Added $or[]
  • Added $allowRoleMentions[]
  • Added $allowUserMentions[]
  • Added $guildExists[]
  • Fixed $serverVerificationLvl

June

  • Fixed $sendMessage[] not working in normal BDScript
  • Fixed $checkUserPerms[]
  • Added BDScript 2
  • Added $try, $catch and $error
  • Added $eval[] (can be only used in BDScript 2)
  • Added $optOff[] (can be only used in BDScript 2)
  • Added $stop[] (can be only used in BDScript 2)
  • Added $var[] (can be only used in BDScript 2)
  • Added customizable code highlighting
  • Fixed $lowestRole and $highestRole
  • Added $isBoolean[]
  • Made it possible to add 5 buttons per row
  • Added optional field return type to $getLeaderboardValue[]
  • Added $deleteRole[]
  • Added $ephemeral
  • Added $elseif[] (can be only used in BDScript 2)
  • Fixed URL in buttons
  • Fixed buttons in DMs
  • Fixed problems with custom prefixes
  • Added $getUserStatus[]
  • Added $min[]
  • Added $max[]
  • Fixed $customEmoji[]
  • Made it possible to edit embeds in $editMessage[]
  • Added support for multiple embeds
  • Added $httpAddHeader[]
  • Added $httpRemoveHeader[]

May

  • Fixed a bug which allowed executing certain types of callbacks as normal commands
  • Fixed member caching issue
  • Fixed caching bots
  • Fixed changing tokens in the webapp
  • Fixed $isUserDMEnabled[]
  • Added $addButton[]
  • Added $editButton[]
  • Added $removeButtons and $removeButtons[]
  • Added $onInteraction[] callback
  • Fixed some issues with slash commands
  • Added $c[] which can be used for commenting your code

April

  • Added $httpGet[], $httpPost[], $httpPut[], $httpDelete[] and $httpPatch[]
  • Improved overall caching
  • Added $httpResult[]
  • Made command execution faster

March

  • Added $cropText[]
  • Added userID field to $awaitFunc[]
  • Fixed removing normal commands and slash commands
  • Added $removeLinks[]
  • Made returning authorID optional in $findUser[]
  • Added $slowmode[]
  • Added $checkUserPerms[]
  • Added $isNSFW[]
  • Fixed setting NSFW in $modifyChannel[]
  • Fixed $userJoined[] and $userJoinedDiscord[]
  • Added $editMessage[]
  • Fixed caching for new members.
  • Added $slashCommandsCount
  • Added $botID
  • Added more permissions - AttachFiles, TTS, ManageWebhooks, EmbedLinks, ExternalEmojis
  • Added $serverCooldown[]
  • Fixed the issue with not expiring app bans
  • Fixed some issues with [ and ]
  • Fixed problems with slash commands and cooldowns

February

  • Added $sendMessage[]
  • Added $reply
  • Added slash commands
  • Fixed mentions in $findChannel[]
  • Improved performance in the command interpreter
  • Optimized reaction handlers
  • Added $isSlash
  • Added new optional field to $message[]
  • Fixed semicolons in $channelSendMessage[]

January

  • Fixed the problem with statuses not showing up
  • Fixed the issue with mentions not working
  • Fixed loading bots from database
  • Increased duration to 40 minutes for $deleteIn[], $editIn[], $editEmbedIn[], $replyIn[]
  • Added if statements ($if[], $else, $endif)
  • GuildID instead of everyone is now returned in $lowestRole[] and $highestRole[]
  • Space commands have been removed (you can still use $alwaysReply)
  • Added $channelTopic[]
  • Fixed issues with streaming status
  • Fixed the issue with tags/discriminators not working for $userID[] and $findUser[]
  • Added $findChannel[] and $channelExists[]
  • Added $userJoined[] and $userJoinedDiscord[]

2020

December

  • Timezones in $time[] has been fixed
  • Updated discord API version
  • Added Competing presence
  • Added $botLeave[]
  • Fix for $getLeaderboardValue[]
  • Added userID option to reset user var
  • Added serverID option to $serverOwner
  • Added $premiumExpireTime

November

  • Fixed disappearing bot status
  • Fixed $serverCount in bot status
  • Improved caching
  • Functions that require privileged intents are now marked accordingly
  • Added $getLeaderboardValue[]
  • Added $awaitReactions[]
  • Awaited commands are now available for everyone
  • Added awaited reactions
  • Fixed problems with DMs

October

  • Optimized memory usage
  • Added member and presence intents
  • Added $editEmbedIn[]
  • Added serverID field to server variables
  • Allowed using awaited functions in awaited commands
  • Fixed leaderboards
  • Fixed $randomMention, $randomUser and $randomUserID
  • Added $awaitReactions[] for premium bots
  • Added $usedEmoji
  • $deletecommand sends an error now
  • Fixed $serverVerificationLvl not working on very high verification servers
  • Fixed reconnecting bots to gateway

September

  • Added $ignoreTriggerCase for premium bots
  • Fixed caching guilds
  • $findUser[] & $findRole[] are no longer case sensitive
  • $findUser[] returns authorID if no user found
  • Added awaited commands for premium bots
  • Fixed weird brackets in embeds
  • Added trigger list in the app

August

  • Migrated to the new infrastructure (new database and API)
  • Premium released
  • Fixed $isMentionable[]
  • Fixed $isHoisted[]
  • Added $removeSplitTextElement[]
  • $userAvatar[] no longer stops code execution
  • Fixed $argCount[]
  • Added $findUser[]
  • Added $findRole[]
  • Added $disableSpecialEscaping

July

  • Renamed $splitText[] to $getSplitText[] to avoid confusion ($splitText[] still works)
  • Added $joinSplitText[]
  • Added $getInviteInfo[]
  • Added $guildID[]
  • Fixed $numberSeparator[] in the bot's status
  • $roleID[] and $channelID[] no longer stop code execution
  • Enabled BDScript Unstable for callbacks
  • Added $getTextSplitLength

June

  • Fixed $getReactions[] in BDScript Unstable
  • Fixed bracket escaping for some commands in BDScript Unstable
  • Fixed $modifyChannel[] (random slowmodes added on channels)

May

  • Fixed $onlyBotPerms[]
  • Bot Designer List Open Beta
  • Added $botListDescription[] and $botListHide
  • Fixed brackets issue in $serverNames
  • Other bug fixing for Bot Designer and Bot Designer List

April

  • Fixed $serverIcon
  • Added $changeCooldownTime[]
  • Disabled $randomUserID, $'randomUserID, $deleteIn and $dm in $onMessageDelete
  • Fixed $addField[]
  • Added error message in $getServerVar[] when provided variable does not exist
  • $userID[] does not stop code execution if user is not found
  • Added $botLeave
  • Removed permission check from $clear command.
  • Fixed $isAdmin[]

March

  • Added $getReactions[] and $userReacted[]
  • New command interpreter
  • Added to new parser:
    • $'random[] and $'random
    • $'randomText[]
    • $'randomUser
    • $'randomMention
    • $'randomUserID
    • $'randomString[]
  • Fixed brackets in $getMessage[]
  • Changed behaviour of $onlyPerms[] command
  • Added $charCount[]
  • Added $clearReactions[]
  • Added new options to $getMessage[]
  • Fixed adding slowmode when using $modifyChannel[]
  • Added $checkContains[]
  • Added $addEmoji[]
  • Fixed the bug with $ command prefix and $noMentionMessage
  • Added $unbanID[]
  • Added $hasRole[]
  • Optimized the leaderboard commands
  • Fixed permissions in some commands
  • Fixed $onlyPerms[]
  • Fixed the bug with $ command prefix and $message

February

  • Fixed errors in $addField
  • Added $serverRegion
  • Added $serverOwner
  • Added $emoteCount
  • Added $isMentionable[]
  • Added $isHoisted[]
  • Added $serverIcon[]
  • Fixed suppressing errors in some variable commands
  • Fixed bug with $replaceText[]() inside $description
  • Added $isValidHex[]
  • Added $isAdmin[]
  • $userID[] does not require discriminator now
  • Added $serverVerificationLvl
  • Fixed stopping command when $changeUsernameWithID[] or $changeUsername[] throws an exception
  • Added $modifyRolePerms[]
  • Added $isUserDMEnabled[]
  • Added new option to $mentioned[]
  • When userID is not provided in $discriminator[], the author's ID will be used
  • Added $argCount[]
  • Added $roleExists[] and $roleExists[]
  • Added $varExistError[]
  • Removed permissions check for $kick[] function
  • Fixed brackets issue in $message and $noMentionMessage
  • Fixed $globalUserLeaderboard[]
  • $repeatMessage[] won't send an error when there is 0 provided

January

  • Final premium preparations
  • Space commands for premium bots
  • Added sendChannelMessage() to JS
  • Added $isNumber[]
  • Better description for $replaceText[]
  • Removed # from $getRoleColor[]
  • Added possibility of adding custom error message to $suppressErrors[]
  • Added $embedSuppressErrors[]
  • Added $getServerVar[] in command's name for premium bots
  • Added custom separators to $numberSeparator[]
  • Fixed issue with + and - in $numberSeparator[]
  • iOS release
  • Added $isBot[]
  • Added userID option to $takeRole[]
  • Fixed problems with timezones
  • @everyone role shows up now when it's a highest/lowest role in $highestRole/$lowestRole
  • @everyone role now works in $rolePosition[]
  • Multiline for $replaceText[]
  • Fixed no errors in $roleID[]
  • Added $toUppercase[] and $toLowercase[]
  • Added roleID and userID to $modifyChannelPerms[]
  • Added $authorOfMessage[]
  • Added $userID[]
  • Improved servers response time by over 10x
  • Fixed issues with $setServerVar[] and $setUserVar[]
  • Added multiline support for $textSplit[]
  • Fixed brackets in $username

2019

December

  • Fixed high ping issues
  • Fixed whole bunch of other issues
  • To JS added:
    • authorId,
    • channelId,
    • userMentions,
    • roleMentions,
    • unban(),
    • takeRole(),
    • giveRole(),
    • channelTyping(),
    • createChannel(),
    • removeChannel(),
    • unpinMessage(),
    • banWithReason(),
    • kickWithReason(),
    • removeRole(),
    • createRole()
  • Created status website https://status.botdesignerdiscord.com
  • Web version of Bot Designer for Discord has been moved to new address https://botdesignerdiscord.com
  • Fixed some issues in web version
  • Fixed $banID[]
  • Preparations for premium points

November

  • Added $rolePosition[]
  • Released translation strings to volunteers
  • Added kick() and ban() to JS
  • Released new stable version

Guides

This section of the wiki contains guides related to BDFD. Here you can learn how to create your first BDFD bot, as well as how to work with things like Select Menu, Buttons and more!

Beginning

In this guide, you will learn how to create a discord bot in BDFD.

Creating a Bot

  • Go to Discord Developer portal.

  • Click on "New Application" button and provide a name to your application.

  • In top-left corner, click on the hamburger icon ≑ and select "Bots" tab.

  • Then, press "Add Bot" button to create a discord bot.

  • Once done, click on "Reset Token" button and copy your bot token.

    ⚠️ Never share your discord bot token with anyone. Learn more

  • Now, open your BDFD app (If you haven't installed the app yet, head over to Play Store/App Store and download it) and click "Create New Bot".

    πŸ“ Make sure when you are creating a new bot, your discord account is logged-in in BDFD app. So that, you don't lose access to your bot in future.

  • Enter bot name and it's token (the one which you have copied it earlier from discord developer portal).

  • If you have a share code, toggle on "Use share code" and put your shared code in the text field.

  • After agreeing to the terms of service of both BDFD app & Discord's, click on "Create bot" to create your discord bot.

Inviting the bot

To add the bot into a server, click me.

Hosting the bot

You can host your discord bot in the app by either watching free ads or purchasing premium.

Commands Anatomy

There are 3 main components to commands, these are: Name, Trigger and Code.

Command Names

Think of this like a note. Command names don't impact your command at all, but they can help you find commands within the app. You can leave this field empty if you choose.

image

Command Triggers

What the user types to run the command. Triggers should contain both a prefix (e.g !) and the actual command name (like help). This combines to !help. Do not include any spaces at the end of the trigger. Triggers are case sensitive (unless the premium function: $ignoreTriggerCase is used in the command code). You can use callbacks in this field.

image

Command Code

The soul of your command. This is what the bot responds when the command is executed, you can use functions like $ping and $message here.

image

Example

image

Output

image

Gateway Intents

This guide will explain to you how to use Gateway Intents in BDFD, and what they are for. If you are looking for general information about Discord's Gateway Intents, read it here.

How to enable Gateway Intents

Gateway Intents must be enabled in the Discord Developer Portal and in the BDFD app for them to work.

Discord Developer Portal

  1. Go to the Discord Developer Portal and select your application.
  2. Go to the "Bot" tab.
  3. Scroll down and enable the Gateway Intents you are interested in.
  4. Save changes.

DDP

BDFD App

  1. Open the app and select your bot.
  2. Go to the "Settings" tab.
  3. Scroll down and enable the Gateway Intents you are interested in.
  4. Save changes.

BDFD

Use of Gateway Intents

Presence Intent

Required for the functions $membersCount[] and $getUserStatus[] to work.

Server Members Intent

Required for some callbacks to work (e.g. for $onJoined[])

Message Content Intent

Required for text commands to work if your bot is verified. Without this intent, your bot can only be based on slash commands.

Variables Guide

Introduction

Variables are how we store data in BDFD. Data can be assigned to users, servers, and globally. Each variable has two elements, which we will breakdown in this section.

Variable Elements

  • name - The name of the variable. This can't be modified by the bot, its used to "call" the current variable.
  • value - The value of the variable. This can be modified by the bot, its returned when the variable name is called in $getVar/$getUserVar/$getServerVar.

Creating Variables

Creating variables can only be done in the app. Here's how to create a variable, which you can get and modify later.

#1: Select the bot you want to add the new variable to.

#2: Select the "Variables" tab.

ex2

#3: Create a new variable.

ex3

#4: Give the variable a name and value.

ex4

#5: Save your changes!

ex5

Editing Variables

Here's how you can modify an existing variable's name/default value.

#1: Select the bot you want to edit the variable for.

#2: Select the "Variables" tab.

ex2

#4: Select the variable you want to edit.

ex3

#5: Edit the variable name and/or value.

ex4

#6: Save your changes!

ex5

Deleting Variables

Here's how you can delete variables,

#1: Select the bot you want to delete the variable for.

#2: Select the "Variables" tab.

ex2

#4: Select the variable you want to delete.

ex3

#5: Confirm the deletion!

ex4

:warning: Deleting variables might return error message in those commands which were using the deleted variables.

Global/Global-User Variables

$setVar[variableName;newValue]/$getVar[variableName] are global variable functions, this means they apply to universally (they don't change per-server or per-user). However, if you input a user in the optional userID field then it becomes a global-user variable. Global-user variables stay with the user in every server. The usage of global-user variables looks like this: $setVar[variableName;newValue;userID]/$getVar[variable name;userID].

Global Variables - Functions

  • $setVar[variableName;newValue] - Changes the provided global-variable's value to 'newValue'.

πŸ§™β€β™‚οΈ Global variables are universal, meaning if the variable gets modified, the modification applies to everyone.

  • $getVar[variableName] - Gets the current value of the provided global-variable.

Global Variables - Example

This is the variable we're working with:

ex

This command adds 1 cool point to the 'CoolCount' variable value, everytime it is ran.

$nomention
$setVar[CoolCount;$sum[$getVar[CoolCount];1]]
Cool counter updated! 😎
$c[Updates the variable for all servers.]

ex

This command returns how many cool points have been earned.

$nomention
Cool counter is at $getVar[CoolCount] currently! Keep running `!cool` for more cool points.
$c[This is the same for everyone, no matter who runs it.]

ex

Global-User Variables - Functions

  • $setVar[variableName;newValue;userID] - Sets the provided variable to 'newValue' for the inputted 'userID'.
  • $getVar[variableName;userID] - Gets the provided variable's value for the inputted 'userID'.

πŸ§™β€β™‚οΈ Global-user variables stay with the user in every server. Unlike user variables which are unique per-user and differ in each server.

Global-User Variables - Examples

This is the variable we're working with:

ex

This command modifies the user's bio.

$nomention
$argsCheck[>1;❌ Please provide text!]
$setVar[Bio;$noMentionMessage;$authorID]
Successfully updated your bio!
$c[Updates the variable for the user in all servers.]

ex

This command returns the user's current bio.

$nomention
**<@$mentioned[1;yes]>'s Bio:**
$getVar[Bio;$mentioned[1;yes]]
$c[Gets the author/mentioned-user's current bio.]

ex

User Variables

User variables are unique per-user and differ in each server.

User Variables - Functions

  • $setUserVar[variableName;newValue;(userID;guildID)] - Sets the provided variable to 'newValue' for the inputted 'userID' and 'guildID', or the author of the command if no 'userID' is provided and current guild if no 'guildID' is provided.
  • $getUserVar[variableName;(userID;guildID)] - Gets the current value for the provided user variable. Returns the author's variable value if no 'userID' is provided and uses the current guild if no 'guildID' is provided.

User Variables - Examples

⚠️ This example would require premium to be fully functional! ⚠️

Here's the variable we're working with:

example

This command adds 1 to the user's 'Mentions' variable, everytime the user mentions someone.

πŸ§™β€β™‚οΈ The trigger for this command would be $messageContains[<@].

$nomention
$setUserVar[Mentions;$sum[$getUserVar[Mentions];1]]

This command returns how many times the user has mentioned others, in the current server:

$nomention
You have mentioned others `$getUserVar[Mentions]` times in $serverName[$guildID]!

ex

Server Variables

Server variables are unique per-server.

Server Variables - Functions

  • $setServerVar[variableName;newValue;(optional) serverID] - Sets the provided variable to 'newValue' for the inputted 'serverID', or the server that the command was ran in; if no 'serverID' was provided.
  • $getServerVar[variableName;(optional) serverID] - Gets the current value for the provided server variable. Returns the current server's variable value if no 'serverID' is provided.

Server Variables - Examples

Here's the variable we're working with:

ex

This command adds 1 cookie to the 'ServerCookies' variable value, everytime it is ran.

$nomention
This server now has `$sum[$getServerVar[ServerCookies];1]` cookies picked πŸͺ
$setServerVar[ServerCookies;$sum[$getServerVar[ServerCookies];1]]

ex

This command returns how many cookies the server has currently.

$nomention
Total Server Cookies: πŸͺ $getServerVar[ServerCookies]

ex

Economy

Local vs Global

  • Local Economy - Changes per server. If a user has 10,000 coins in one server, in another server they would have a different amount. For example, Unbelievaboat has a local economy. (local economy uses user-variables)
  • Global Economy - Does not change per server. If a user has 10,000 coins in one server, in another server they would have the same amount. For example, Dank Memer has a global economy. (global economy uses global-user variables)

Local Economy

  • Replace "Money" with your cash/money variable, if "Money" is the name of your money variable then you can just leave it as is!
  • Replace "Amount" with the amount of money you want to add/remove to/from the user. Like this: 100, $random[1;10], $random[100;1000], 10000.

Gets the user's current balance. If a user mention is provided, then the bot will return that user's balance:

$getUserVar[Money;$mentioned[1;yes]]

Adds money to the mentioned user:

$setUserVar[Money;$sum[Amount;$getUserVar[Money;$mentioned[1]]];$mentioned[1]]

Adds money to the user running the command:

$setUserVar[Money;$sum[Amount;$getUserVar[Money]]]

Removes money to the mentioned user:

$setUserVar[Money;$sub[Amount;$getUserVar[Money;$mentioned[1]]];$mentioned[1]]

Removes money from the user running the command:

$setUserVar[Money;$sub[Amount;$getUserVar[Money]]]

Leaderboard:

$userLeaderboard[Money;asc]

Global Economy

  • Replace "Money" with your cash/money variable, if "Money" is the name of your money variable then you can just leave it as is!
  • Replace "Amount" with the amount of money you want to add/remove to/from the user. Like this: 100, $random[1;10], $random[100;1000], 10000.

Gets the user's current balance/amount of money. If a user mention is provided then the bot will return that user's balance:

$getVar[Money;$mentioned[1;yes]]

Adds money to the mentioned user:

$setVar[Money;$sum[Amount;$getVar[Money;$mentioned[1]]];$mentioned[1]]

Adds money to the user running the command:

$setVar[Money;$sum[Amount;$getVar[Money;$authorID]];$authorID]

Removes money to the mentioned user:

$setVar[Money;$sub[Amount;$getVar[Money;$mentioned[1]]];$mentioned[1]]

Removes money from the user running the command:

$setVar[Money;$sub[Amount;$getVar[Money;$authorID]];$authorID]

Global leaderboard:

$globalUserLeaderboard[Money;asc]

Leaderboards

You can generate variable leaderboards, using the functions below. Click the hyperlinks for more information about these leaderboard functions.

Additional Tips

  • You can change the variables with a userID or with a mention of the user. Here's a example:
$setUserVar[Money;0;<@696368083517964288>]
$setUserVar[Money;0;696368083517964288]

$getUserVar[Money;<@696368083517964288>]
$getUserVar[Money;696368083517964288]

$setVar[Money;0;<@696368083517964288>]
$setVar[Money;0;696368083517964288]

$getVar[Money;696368083517964288]
$getVar[Money;696368083517964288]

$c[All of these would work fine!]

Awaited Commands

Awaited commands are a special type of command where the bot waits for the user's response.

end result

In the above screenshot, the bot asks the user to provide a number and then checks, if provided value is a number.

Getting Started

To create an awaited command, following function and callbacks are used -

$awaitFunc[]

$awaitFunc is a function. It's used to initiate an awaited command.

Usage

$awaitFunc[command name;(user ID)]
  • command name - The name which is used inside $awaitedCommand and $awaitedCommandError callback.
  • user ID - The user the awaited command will trigger for. Uses command author, if user id is not given.

$awaitedCommand[]

$awaitedCommand is a callback. It gets triggered when an awaited command gets initiated.

Usage

$awaitedCommand[name;(filter)]
  • name - The name which is used in $awaitFunc function.
  • filter - It is used to limit user input. Supported filters are
    • <numeric> - Accepts only number input.
    • <word1/word2> - Accepts only those specified words provided inside <>. Use / as separator for multiple words.
    • empty - Accepts any input from the user. To use this filter, keep filter argument empty.

$awaitedCommandError[]

$awaitedCommandError[] is a callback. It gets triggered when an awaited command doesn't match with provided filter.

Usage

$awaitedCommandError[name]
  • name - The name which is used in $awaitFunc function.

Examples

  • Empty Filter

    Screenshot_20220812_204604 Screenshot_20220812_204552 Screenshot_20220812_205309

  • Choice Filter

    Screenshot_20220813_072224 Screenshot_20220813_072236 Screenshot_20220813_072322 Screenshot_20220813_072131

    ⚠️ The above example requires BDScript 2 since it contains $elseif.

  • Numeric Filter

    Screenshot_20220812_211213 Screenshot_20220812_211252 Screenshot_20220812_211311 Screenshot_20220812_211155

BDScript 2

Introduction

BDScript 2 is the default in-app scripting language (as of October 2021). It has been created with intention of enhancing its capabilities and fixing some of the problems previous versions had.

The first edition of BDScript has one big issue, commands like $sum[$sum[3;2];1] didn't work. The reason it didn't work is because BDScript has a pre-defined order for executing functions.

In order to fix the issue, a new BDScript edition was developed called BDScript Unstable. It executes function in a command from bottom to top and from right to left. It fixes the issue, but the new edition has its quirks which could be problematic for some commands. That's where BDScript 2 comes in. This edition executes commands from top to bottom and from left to right (basically, just the way you read most of the books).
Besides that, BDScript 2 has additional features like $eval[], $try and $catch and more.

Features

$eval[]

Warning: It should be used with caution. Remember to restrict the command with $onlyForIDs[] or similar function! If you programmed in JavaScript, you probably know what it does. It basically executes every function that is provided as an argument. For example:

$eval[$message]

This will execute every function that has been provided by a user.

$try, $catch and $error[]

This works in a very similar way to the equivalents available in other programming languages.
You can read more about it here.

$async

Runs functions asynchronously. Read this for more information.

$elseif

Read this for more information.

$var[]

It can be used to temporarily store a value. After the command executes, all of the vars are removed.

For this specific variable function, you don't need to create a corresponding variable in the app.

To store a value, simply use $var[VARIABLE NAME;VALUE] and to retrieve, do $var[VARIABLE NAME].

$stop

It stops the command execution. It may seem like a useless function but it can come in handy with $ifs or $trys.

$optOff[]

It should be used only by more advanced users.
The full function's name is optimizations off. Sometimes BDScript 2 doesn't execute the same function twice and it uses the previous result instead. $optOff[] allows disabling that behaviour for provided functions.

Here's a small example:

$random // returns 3
$random // returns 3
$random // returns 3
$optOff[$random] // returns 1
$random // returns 1
$random // returns 1

Async

Runs functions in the background. Using async features properly can optimize your code and make it faster!

Warning: Async features only work in BDScript 2.

Breakdown

  • Use $async[name] to start an async block. The name must be unique to the block. Functions inside async blocks run in the background without blocking the command's thread.
  • Use $endasync to end async block.
  • Use $await[name] to wait for the async block's result.

Examples

Example #1

$async[test]
  $setVar[money;0]
  $addReactions[πŸ‘Œ]
$endasync

Money set to 0

Example #2

$async[test1]
  $setVar[banned;1]
$endasync

$async[test2]
  $banID[some reason;246604909451935745]
$endasync

$await[test1]
$await[test2]

Done

Buttons

In this section, you'll learn how to use the button components.

demonstration

Button Style

Buttons can have different styles (background colors). Here, are all possible values for style function argument.

  • primary
  • secondary
  • success
  • danger
  • link

πŸ“ If link style is used, the button won't send any interactions!

Style examples

button styles
The image was taken from Discord Docs

Button types

There are 2 types of buttons : interactive and link.

When an interactive button is pressed, it sends an interaction which can be used together with $onInteraction[ID].

Every interactive button has an ID. If you create $onInteraction[ID] callback, it will get triggered when the button with the same ID is pressed. Interactive buttons can use every style except link.

Link buttons don't send any interactions. When they're pressed they forward the user to a website. Link buttons have to set their style argument value to link.

Adding a button

Buttons can be added to a new message or already existing message.

$addButton[New row;Button ID/URL;Label;Style;(Disabled;Emoji;Message ID)]

Function arguments breakdown

  • new row - If set to yes the button will appear in a new row. If it's set to no the button will appear in the same row as a previous button. Check examples below.

    πŸ“ A message can have a maximum of 25 buttons (5 rows of 5 buttons).

  • button ID/url - Depending on a button type, you either set it to interactionID which is then used in $onInteraction[ID] callback or URL if it's link button.

  • label - It's the text value visible on a button

  • style - It's used to specify the button's background color. If the button has a link/url you have to set this to link. Check this section for more details.

  • disabled - If set to yes the button can't be pressed. Defaults as no. (Optional)

  • emoji - Adds an emoji inside the button. Emojis have to be either pasted as unicode or be in this format <:emoji name:emoji ID>. (Optional)

  • message ID - Adds a button to the provided message ID. It's important to note that provided message ID author has to be the bot. (Optional)

Note: Interactive buttons can't have duplicated ID's in the same message. So for example, you can't have two buttons with the ID set to test

Note: If url is used in interaction ID or url argument, it has to start with http:// or https://

Editing a button

$editButton[Button ID/URL;Label;Style;(Disabled;Emoji;Message ID)]

Arguments work exactly the same way as in $addButton function. Button ID/URL is used for finding the button.

Removing buttons

Removing button from a message can be done using these three functions :

Examples

Creating a simple interactive button

code example

Note: The last argument in $addButton is empty because we don't want emojis for this example

Creating $onInteraction[] callback

callback code example

Note: ID provided in $onInteraction[] is the same as the one provided in $addButton[] from this section

Note: In $addButton[], yes is being used for the new row argument so that the button would appear in the next row. Check the output below.

Output

Command execution

demonstration

After pressing the button

demonstration pressed button

$try, $catch and $error

Allows handling errors in BDScript 2

Breakdown

  • Use $try to specify functions to execute
  • Optionally use $catch to specify what functions should be executed if one of the functions in $try fails.
  • Use $error[] inside $catch to retrieve information about the error.
  • Use $endtry to end $try

$error[]

It can be used inside $catch to retrieve information about the error.
Possible arguments:

  • command - retrieves the name of a function that failed.
  • source - retrieves the whole function together with arguments.
  • message - retrieves the error message.
  • row - retrieves the error code row number.
  • column - retrieves the error code column number.

Examples

1

Hi!
$try
  Sum: $sum[$message[1];$message[2]]
  Sub: $sub[$message[1];$message[2]]
$catch
  Error occured: $error[message]
$endtry

Output for $message[1] equal to 10 and $message[2] equal to 5:

Hi!
Sum: 15
Sub: 5

Output for $message[1] equal to abc and $message[2] equal to 5:

Error occured: Invalid arguments!

2

In this example we won't use $catch

$try
$time[$message]
$endtry
Time zone has been set!

Output for $message equal to Europe/Warsaw (correct timezone):

Time zone has been set!

Output for $message equal to Mars (wrong timezone):

Time zone has been set!

As you can see the output is the same because we don't handle the errors here (there is no $catch). We just simply ignore them.

HTTP Requests

  • A HTTP request is an action to be performed on a resource identified by a URL.

Before reading this guide, please note that this feature is not intended for new BDFD users, as it is pretty advanced.

HTTP Request Types

This is a list of all HTTP request types available.

GET

  • Retrieves data from a resource.
$httpGet[url]

POST

  • The data sent to the server with POST is stored in the request body of the HTTP request.
$httpPost[url;(body)]

PUT

  • The PUT method replaces all current representations of the target resource with the request payload.
$httpPut[url;(body)]

DELETE

  • The DELETE method deletes the specified resource.
$httpDelete[url;(body)]

PATCH

  • The PATCH method applies partial modifications to a resource.
$httpPatch[url;(body)]

HTTP Headers

  • HTTP Headers is used to add more information. Most of the time, this is used to send an API Key to the API.
$httpAddHeader[header name;header value]

HTTP Results

  • To return the result of a HTTP method function, you can use $httpResult/$httpResult[].

Usage #1

$httpResult

Retrieves text value from HTTP request.

Usage #2

$httpResult[JSON Key;...]

Retrieves JSON from HTTP request. All arguments after JSON Key are optional.

Examples

Basic level

An example using a $httpGet function

$nomention
$httpGet[https://nekos.best/api/v2/neko]
$title[Here is a Neko for you!]
$description[**Source:** $httpResult[results;0;source_url]]
$image[$httpResult[results;0;url]]
$footer[nekos.best API]
$color[#e91e63]

Neko

API: nekos.best

Advanced level

An example using a function that has a request body (e.g. $httpPost) and using $httpAddHeader

$httpAddHeader[content-type;application/x-www-form-urlencoded]
$httpPost[https://pastebin.com/api/api_post.php;api_dev_key=7CP52G-BTQP_1AhyBBlTa94qyjE6vHzU&api_paste_code=$url[encode;$message]&api_option=paste]
$httpResult

Pastebin Pastebin

API: pastebin.com

If Statements

Interprets commands conditionally. Every if statement starts with $if[condition] and has to end with $endif. $else is optional.

Breakdown

  • Use $if[] to specify a block of code to be executed, if a specified condition is true.
  • Use $else to specify a block of code to be executed, if the same condition is false.
  • Use $elseif[] to specify a new condition to check, if the first condition is false (can be only used in BDScript 2)
  • Use $else and $if[] to specify a new condition to check, if the first condition is false.
  • Use $endif to end a if statement.

Examples:

$if[$username==kubastick]
  Hi Kuba!
$else
  Hi $username!
$endif
$if[$getUserVar[money]>0]
  You're not broke
$endif
$if[$username==noituri]
  $if[$message[<]==nice]
    Noit said nice
  $endif
$endif

Only for BDScript 2:

$if[$message==test]
  You said test
$elseif[$message==BDFD]
  Bot Designer for Discord
$elseif[$username==noituri]
  Hi Noituri!
$else
  I don't know what to say
$endif

Note: You can use multiple $elseifs

Explaination

$if[] uses the format of: if x is related accordingly (based on the "sign") with y then the code below runs.

Signs

== - Equal

!= - Not Equal

< - Less Than

> - Greater Than

>= - Greater Than Or Equal To

<= - Less Than Or Equal To

  • These signs could vary in meaning based on the order or intent of the if statement.
  • If you are using text as your x and/or y, you can not use any other signs besides == and !=. However for numbers, you can use any sign shown in the above list.

Base Usage

$if[valuex(sign)valuey]

Else If

$elseif can be only used in BDScript 2. If you use different BDScript edition please read the note below.

Note: Normal BDScript and BDScript Unstable don't have a specific function for else if blocks, but you can still do them by using $else and $if[]. The difference between $else and $else/$if[] is that else doesn't need a condition. Where as else if is still an if so it needs a condition. The main purpose for else if is to make it so only one if statement runs. Unlike regular if statements, the else if blocks should end with $else then start with another $if[]. Once you are done with your else if statements, close all of them with x number of $endifs (x = number of else if statements) at the bottom of the last else if statement.

Example Else If for Normal BDScript and BDScript Unstable

$if[$checkContains[$message;hi]==true]
Hello

$else
$if[$checkContains[$message;yes]==true]
Sure!

$endif
$endif

Modals

In this section, you'll learn how to use the modal message component.

⚠️ Warning: Modals are only supported for interaction responses (like slash commands, buttons, select menus, etc), you can't open a modal from just a message command.

Creating a Modal

$newModal[modalID;title]

  • modalID - Used in $onInteraction[ID] callback. It works same way as buttons and select menus.
  • title - The text which is displayed on top of a modal. This value must be less than or equal to 45 characters.

Adding Input Fields in the Modal

$addTextInput[textInputID;style;label;(minimumLength;maximumLength;required;value;placeholder)]

  • textInputID - ID that is used to retrieve the text input in the field. This value must be unique. (Used in $input[textInputID])

  • style - The text input field style, either short or paragraph.

  • label - Name of the text input field. This value must be less than or equal to 45 characters.

  • minimumLength - Minimum number of characters a user needs to input. This value must be an integer between 0 and 4000, and can't be greater than the maximumLength.

  • maximumLength - Maximum number of characters a user can input. This value must be an integer between 0 and 4000, and can't be less than the minimumLength.

  • required - Whether a user must fill in the text input field, defaults to true.

  • value - The text that is written by default in the text input field. This value must be less than or equal to 4000 characters and must not be less than minimumLength and no more than maximumLength.

  • placeholder - The text that is displayed if the text input field is empty. This value must be less than or equal to 100 characters.

πŸ§™β€β™‚οΈ Note: You can't add more than 5 text input fields.

Getting Input from a Modal Submission

Use this function in response to the modal submission interaction:

$input[textInputID]

  • textInputID - The text input field to get the user's input from.

Example

Command Trigger: !modal | Command Code:

$nomention
Modal Example
$addButton[no;bio;Click me!;primary]

Command Trigger: $onInteraction[bio] | Command Code:

$nomention
$newModal[modal;User Bio]
$addTextInput[modalInput1;short;What is your name?;3;30;yes;;MikoΕ‚aj]
$addTextInput[modalInput2;short;What are your pronouns?;2;30;yes;;He/Him]
$addTextInput[modalInput3;paragraph;Can you tell us about yourself?;5;1000;no;;I am a Developer]

πŸ€” Explanation: The code above executes when the button from the previous code gets clicked. So, when the user clicks the button the modal appears.

Command Trigger: $onInteraction[modal] | Command Code:

$nomention
Name : $input[modalInput1]
Pronouns : $input[modalInput2]
About me : $input[modalInput3]

πŸ€” Explanation: The code above executes when the modal is submitted, because in the previous command we inputted the custom ID 'modal' into the $newModal[] function: $newModal[modal;User Bio].

Result

Select Menu

In this section you'll learn how to use the select menu component.
demonstration demonstration with options

Creating a new select menu

$newSelectMenu[interaction ID;min values to select;max values to select;placeholder;messageID(optional)]

  • interaction ID - it's used for $onInteraction[ID] callback. It works the same way as buttons
  • min values to select - minimum amount of values that can be selected
  • max values to select - maximum amount of values that can be selected
  • placeholder - it's a text that appears if no value is selected
  • messageID(optional) - ID of a message that should have select menu added to it. By default it's the bot's response.

Adding an option to select menu

$addSelectMenuOption[select menu's interaction ID;label;value;description;default (yes/no);emoji (can be left empty);messageID (optional)]

  • select menu's interaction ID - it has to be the same as the ID used in $newSelectMenu[]
  • label - the name of the option
  • value - it's the data that gets passed to $onInteraction[] callback. The value has to be unique in the select menu!
  • description - it shows up under the label
  • default (yes/no) - should the option be selected by default. There can be only one default option!
  • emoji - it shows up next to the label
  • messageID (optional) - same as in $newSelectMenu[]

Example

Select Menu code:
select menu code

Interaction code:
interaction code

Usage:
before using after using

Slash Commands

In this guide, you will learn more about implementing slash commands to your bot.

Slash commands are type of interactive application commands. It let's users to interact with your bot by typing /<command name>.

preview

General information

  • Discord allows up to 200 slash commands (100 global & 100 guild based commands).

  • To use slash commands, you need to invite the bot with applications.commands scope.

  • Creating/modifying/deleting global slash commands might take up to 1 hour.

  • Creating a guild slash command is instant but it won't appear unless you have registered them in the current guild using $registerGuildCommands[(slash command name;...)] function.

    πŸ“ Guild slash commands doesn't appear in DMs unlike global slash commands.

Getting started

Before you start, you need 2.0.18 version of the app or later.

Inviting the bot

  • Method #1

    • Visit Discord Developer official website and select your bot application.
    • Click hamburger icon ≑ on top-left of the website and choose OAuth2 tab.
    • In OAuth2 tab, click URL Generator sub-tab.
    • Choose bot & application.commands in scopes and desired bot permissions.
    • Copy the generated url below and invite your bot into your server.
  • Method #2

    • Open BDFD app and select your bot.
    • Press Add invite bot to server button in dashboard tab.
    • Click Edit invite link scopes and enable "Slash commands" if its disabled.
    • Now, go back & press "Add your bot to your server"
    • Finally, invite the bot into your server.

Creating a slash command

  • Create or modify an existing command.
  • Click "Slash command trigger".
  • Choose "Enable global slash command" or "Enable guild slash command" as per your preference.
  • Fill-up necessary data and save it.

πŸ“ Slash commands can have a maximum of 4000 characters (combined name, description, and value properties) per slash.

Example

Screenshot_20220717_170852 Screenshot_20220717_170915 Screenshot_20220717_171511

Slash options

Slash options are great way to get an user's input in slash commands.

To create a slash option,

  • Open your slash command edit trigger page.
  • Click "Add" button in Options section.
  • Fill-up necessary data and save the changes.

πŸ“ Slash commands can have upto maximum 25 options per slash.

Slash options types

  • Text - Accepts any string data input.
  • Integer - Accepts only integer value input. For example: 3, -70 etc.
  • Number - Accepts only number value input. For example: 5.3, -35, 23 etc.
  • Boolean - Accepts either true or false input.
  • User - It allows to mention any user.
  • Channel - It allows to mention any channel.
  • Role - It allows to mention any role.
  • Mentionable - It allows to mention any user or role.
  • Attachments - It allows to upload attachments.

Retrieving value from options

To retrieve a value from an option, use $message[<option name>].

πŸ“ If you want this function to work both in normal and slash command,
then you can use $message[<arg number>;<option name>].

Example

Screenshot_20220717_175245 Screenshot_20220717_175635 Screenshot_20220717_175649

Pre-defined choices

To create choices in options,

  • In your slash command edit trigger page, create an option and fill-up the necessary data.
  • Toggle "Enabled" in Predefined choices section.
  • Then, click "Add a new choice" button.
  • Type your choice name and value.
  • Click "Add" and save the changes.

πŸ“ A slash command can have upto maximum 25 choices per option.

Retrieving choices

You can retrieve user's option choices using $if statements.

Format

$if[$message[<option name>]==<choice #1 value>]
      $c[Text/code here when user select 1st choice]
$elseif[$message[<option name>]==<choice #2 value>]
             $c[Text/code here when user select 2nd choice]
$endif

⚠️ Above code snippet requires BDScript 2 in order to execute since it contains $elseif.

Example

Screenshot_20220717_194906 Screenshot_20220717_195016 Screenshot_20220717_194125 Screenshot_20220717_194202 Screenshot_20220717_194214

Auto Complete for Slash Command Options

Auto complete allows your bot to read user input as they type it and give user suggestions based on that.
example-autocomplete
Check example to get started quickly.

General Information

  • You can only create up to 25 suggestions per option
  • You need to enable autocomplete for the option
  • You can't use option choices with autocomplete

$onAutoComplete[command name] callback

This callback receives information about current user input. It's used for adding suggestions.
command name is the name of a slash command.

Avaliable functions

$appendOptionSuggestion[name;suggestion]

Used for adding new suggestions.

  • label - text which will be displayed in the suggestion list (for example: arg-ad from the previous example)
  • value - data that can be accessed in a slash command by using $message[] function. label is only a display name but value holds the actual value for a suggestion.

Note: value must have the same type as the currently typed option! Meaning, if the option's type is Integer, value can't be set to Hello but it can be set to 123

$autoCompleteOptionName

Returns the name of currently being typed option. For example arg from the previous example

$autoCompleteOptionValue

Returns the current user input. For example ad from the previous example

Example

New slash command with a new option:

slash auto complete

Slash option:

slash option

Slash command code:

$message[arg]

$onAutoComplete[] callback:

autocompletetrigger

Callback code

$nomention
$appendOptionSuggestion[$autoCompleteOptionName-$autoCompleteOptionValue;$autoCompleteOptionValue]
Explanation
  • $appendOptionSuggestion[] - adds new suggestion
  • $autoCompleteOptionName-$autoCompleteOptionValue - suggestion's label. It's set to the option name and user input (<option name>-<user input>)
  • $autoCompleteOptionValue - suggestion's value. It's set to whatever user typed.

Result:

1.

example-autocomplete

2.

example-autocomplete2

Threads

example

Threads are subset-channels within a channel. Threads are great for separating different conversations in one channel. This wiki will explain how you can integrate threads in your bot.

⚠️ In order to send a message in thread, make sure your bot has SEND_MESSAGES_IN_THREADS permission.

Creating a Thread

$startThread[name;channelID;messageID (canBeLeftEmpty);archiveDuration (60/1440/4320/10080);returnThreadID (yes/no)]

Starts a thread (learn more)

Editing a Thread

$editThread[threadID;name;archived (yes/no);archiveDuration (60/1440/4320/10080);locked (yes/no);slowmode (in seconds)]

Edits an existing thread. (learn more)

Member Thread Management

Adding a User to a Thread

$threadAddMember[threadID;userID]

Adds a user to the thread. (learn more)

Removing a User from a Thread

$threadRemoveMember[threadID;userID]

Removes a user from the thread. (learn more)

Example

$var[threadID;$startThread[Cool Thread;$channelID;;1440;yes]]
I created a new thread! <#$var[threadID]>
$c[❗️This example requires BDScript 2 enabled❗️]

Further Reading

If you want to learn more about threads, read Discord's support article.

Text Splitting

Text splitting functions are useful for advanced codes that deal with multiple user arguments, or even adjusting function outputs (for advanced users). This wiki includes information on how to use these functions.

Functions

$textSplit[]

$textSplit[text;splitter]

Splits the text into sections by a splitter.

$splitText[]

$splitText[index]

Retrieves a value from $textSplit.

πŸ§™β€β™‚οΈ You can also use $splitText[>] to retrieve the last value of the split.

$getTextSplitLength

$getTextSplitLength

Returns how many splits there are in $textSplit. Here's an example:

$textSplit[hello world | hello planet | hello earth;|]
$getTextSplitLength

example

$getTextSplitIndex

$getTextSplitIndex

Retrieves the position of the provided value in $textSplit. Returns -1 if it couldn't find the value. Here's an example:

$textSplit[Cake-Bread;-]
$getTextSplitIndex[$message]

​​image​

$removeSplitTextElement[]

$removeSplitTextElement[index]

Removes a element from $splitText. Here's an example:

$textSplit[hello world | hello planet | hello earth;|]
$removeSplitTextElement[1]
1: $splitText[1]
2: $splitText[2]

example

$joinSplitText

$joinSplitText[splitter]

Joins $textSplit values with provided 'splitter'. Here's a example:

$textSplit[hello world | hello planet | hello earth;|]
$joinSplitText[+]

example

Examples

Example #1

$textSplit[hello world | hello planet | hello earth;|]
1: $splitText[1]
2: $splitText[2]
3: $splitText[3]

example

Example #2

$textSplit[text1-text2-text3-text4;-]
1: $splitText[1]
2: $splitText[2]
3: $splitText[3]
4: $splitText[4]
Length: $getTextSplitLength

example

Webhooks

This wiki explains how to create and use webhooks in BDFD.

Creating A Webhook

$webhookCreate[channelID;username;avatarURL (can be left empty)]

Creates a webhook in the provided 'channelID', with the inputted 'username' and 'avatarURL' assets. This function returns the URL of the newly created webhook (webhook URLs should be kept private, treat them like a password).

Note: Only ten webhooks can be created per channel.

Editing A Webhook

$webhookAvatarURL[webhookURL;avatarURL]

Changes the provided webhook's avatar.

$webhookUsername[webhookURL;username]

Changes the provided webhook's username.

Webhook Messages

You can send messages via a webhook using the following functions:

  • $webhookTitle[webhookURL;text] - Adds a title to the webhook embed.
  • $webhookDescription[webhookURL;text] - Adds a description to the webhook embed.
  • $webhookFooter[webhookURL;text] - Adds a footer to the webhook embed.
  • $webhookContent[webhookURL;text] - The webhook non-embedded message content.
  • $webhookColor[webhookURL;colorHex] - The color of the webhook embed.

Alternatively, you can use $webhookSend[] for more options and condensement:

$webhookSend[webhookURL;content;title;titleURL;description;color;author;authorIcon;footer;footerIcon;thumbnail;image;addTimestamp (yes/no)]

Note: Unneeded fields can be left empty.

Deleting A Webhook

$webhookDelete[webhookURL]

Deletes the provided webhook.

Example

$nomention
$var[webhookURL;$webhookCreate[$channelID;Cool Webhook;]]
$webhookContent[$var[webhookURL];Hello World!]
$c[❗️This example requires BDScript 2 enabled❗️]

Explaination:

This code is storing the newly created webhook URL returned from $webhookCreate[] (using $var[]). Then, in the rest of the code $var[webhookURL] was called to get the webhook URL, which allowed the webhook message to send using $webhookContent[].

πŸ§™β€β™‚οΈ Remember, you need to be in BDScript 2 mode to use $var[]!

Output:

example

Character Escaping

(for advanced users)

What are Escape Characters?

Escape characters are used to indicate that the character should not be interpreted as a modification of the code, rather just text that appears in the code or bot's response. Basically, escape characters let your bot return the function-triggering characters (e.g ;, $, [, ]) without any changes to the code.

Escapable Characters

CharacterEscaped
;%{-SEMICOL-}% or \;
$%{DOL}%
[\[
]%ESCAPED% or \]
\\\

Example

$sendMessage[[ Hi, this is pretty cool\; right? \]]

example

Hyperlinks

A hyperlink is clickable-text. When the user clicks on the text, it directs them to a certain URL.

You can use hyperlinks inside $description[], $addField[], webhook content/description, slash command response content, and ephemeral $onInteraction response content.

Syntax

[text\](link)

Note: This is the syntax for BDScript 2 and BDScript Unstable. For the BDScript, the syntax is [text](link).

Note: In the case of using hyperlinks inside slash command response content or ephemeral $onInteraction response content, the syntax for BDScript should be used. Does not apply to hyperlinks that are inside functions that support hyperlinks.

Example

$nomention
$description[This bot is made with [Bot Designer For Discord\](https://botdesignerdiscord.com)]

example

Use the $embeddedURL function to add a hyperlink in $title.

Use the $authorURL function to add a hyperlink in $author.

Share code

"Share code" is a feature that lets users share a copy of their entire bot.

Creating a share code

Here is how you can create a share code of your bot -

  • Select your bot in BDFD app homepage.
  • Head over to "Bot Settings" tab.
  • In "Share code" section, click "Create a share code" button.
  • Then, click "Generate share code" button and copy the code.

Now, you can give the code to your friend or someone other, and they will be able to create a carbon copy of your bot.

⚠️ Once a share code has been used, it expires after a month.

Resources

This section of the wiki contains useful information that will allow you to expand your knowledge.

API

Public Bot Designer for Discord API

Endpoints

The base URL is https://botdesignerdiscord.com/public/api

GET /function_list

Returns an array of functions

GET /function_tag_list

Returns an array of function tags

GET /function/:function

  • :function - function tag
    Returns a function

Data Structures

  • Can be empty means the field can be set to a default value.
  • Can be omitted means the field might not be included in the response.

Function

Field nameTypeDescriptionCan be emptyCan be omitted
tagStringFunction nameFalseFalse
shortDescriptionStringDescription for a function without argumentsTrueFalse
longDescriptionStringDescription for a function with argumentsTrueFalse
argumentsArray of ArgumentsArguments needed by a functionTrueFalse
intentsIntegerDiscord intents needed by bot to execute this functionFalseFalse
premiumBoolfunction needs premiumFalseFalse
deprecatedBoolfunction is deprecatedFalseTrue
deprecatedForStringName of the function that should be used insteadFalseTrue

Argument

Field nameTypeDescriptionCan be omitted
nameStringArgument nameFalse
descriptionStringDescription for a function's argumentTrue
typeString Argument TypesArgument type. \| is used for a compound typeFalse
requiredboolArgument is requiredFalse
tupleTypesArray of ArgumentsArray of arguments which can be repeated, i.e channelID;messageID;channelID;messageID;...True
emptyBoolArgument can be emptyTrue
ellipsisBoolArgument accepts more data, i.e username1;username2;username3;...True
enumDataArray of StringsPossible options accepted as argument, i.e primary/secondary/or/etcTrue

Argument Types

Multiple types can be merged together with | (OR).
Possible argument types:

  • String
  • Integer
  • Float
  • Snowflake
  • Bool
  • Color
  • Permission
  • Duration
  • HowMany (>, 2, <, etc)
  • URL
  • Enum
  • Tuple

BDFD's Creation

How Bot Designer For Discord became what it is today.

Who Develops BDFD?

NameDiscord TagPosition
Jakub Tomanawiadr000#1947 (kubastick)Owner/Developer
MikoΕ‚aj Radkowskinoituri#1111Developer
BartΕ‚omiej SkoczeΕ„MineBartekSA#4899Developer

The Company

NilPointer Software is the company that made Bot Designer For Discord. NilPointer Software, a start-up focused on providing fast and quality software.

BDFD's Beginning and Growth

Kubastick was inspired by one of his friends to create the application. One day, his friend stated, β€œIt would be nice if there'd be an app for creating bots”. Kubastick having previous programming knowledge, took this idea and ran with it.

By early 2019, the premature version of BDFD was created. Later on, Kubastick acquired two developers, MineBartekSA and noituri. This is when the app's functions and UI got majorly improved.

BDFD was slowly growing, until Discord's explosion during the COVID-19 pandemic, which caused a uproar of users coming to BDFD to create their very own bots... and the rest is history... The growth of BDFD isn't stopping though, as the developers are actively integrating new features; and the community is growing larger by the day.

πŸ§™β€β™‚οΈ Have more questions? Ask in our community server.

Discord's ID System

Discord's ID System allows bot's to manage and use IDs to get/edit object data (e.g. returning user's name, deleting a role etc).

What's an ID?

An ID is a Discord object identifier. Let's break this down:

  • An 'object' refers to a Discord channel, role, user, server/guild, etc.
  • An 'identifier' (typically called 'ID') refers to the multi-digit number that the object belongs to.

Enabling Developer Mode

In order to access and copy IDs in the Discord client, you must enable developer mode. Here's how:

  • Desktop

    ex1

    ex2

    ex3

  • Mobile

    Go to User Settings > Appearance > Advanced and turn on Developer Mode.

    ex4

Finding IDs

Where do I find these 'IDs'?

You can use 'Functions That Return IDs' to retrieve IDs.

If you want to get IDs using your client, check out Discord's full guide on getting IDs!

Using IDs in Commands

There are a lot of functions that use IDs. Like, $deleteChannels, $modifyRole $banID, and many more.

Let's use $deleteChannels for this example. In order to delete a channel, we need the channel's ID. Here's how $deleteChannels could look:

$deleteChannels[320949943877437847]
$c[Deletes the provided custom channel ID.]

$deleteChannels[$channelID]
$c[Deletes the channel where the command was ran.]

$deleteChannels[$mentionedChannels[1]]
$c[Deletes the mentioned channel.]

⚠️ Be careful not to mix up ID types. For example, you can't do $deleteChannels[$authorID]. This is because $authorID returns a user ID, not a channel ID.

Functions That Return IDs

  • $authorID/$userID/$roleID/$channelID
  • $findUser/$findChannel/$findRole
  • $mentioned/$mentionedChannels/$mentionedRoles
  • ... (a few others)

Using IDs For Mentions

  • Mentioning an User - <@userID>
  • Mentioning a Role - <@&roleID>
  • Mentioning a Channel - <#channelID>
  • Using an Emoji
    • Static - <:emojiName:emojiID>
    • Animated - <a:emojiName:emojiID>
  • Mentioning a Slash
    • Normal - </name:commandID>
    • Subcommand - </name subcommandName:commandID>
    • Subcommand group - </name subcommandGroup subcommandName:commandID>
  • Mentioning a Guild - Guilds can't be mentioned.

πŸ“ Non-bots can use IDs to mention objects too!

Embed Indexes

If you look around BDFD embed functions (eg. $title, $footer, $addTimestamp etc.). You'll see an argument called index. This argument is used to create multi-embeds.

πŸ“ Discord supports creating upto a maximum of 10 embeds per bot message.

Creating Multi-Embeds

By default, the index is set to 1 (the first embed). To create a second embed, you have to write 2 in index argument and so on. You can specify any number between 1 to 10 in index argument.

πŸ“ Total character length of the overall response should not exceed more than 6,000. If it does, the bot won't send the message.

Example

$nomention

$title[Title #1]
$description[Description #1]

$title[Title #2;2]
$description[Description #2;2]

$title[Title #3;3]
$description[Description #3;3]

example

2FA and Elevated Permissions

If a guild owner enables the server's "Two-factor authentication for moderation" setting, everyone executing a certain segment of actions will need to have two-factor authentication (2FA) enabled on their account. Since, bots do not have 2FA themselves, you as the bot owner, will need to enable it on your account.

ex

The permissions assigned to these actions are referred to as "Elevated permissions". Elevated permissions include but may not limited to :

  • admin
  • ban
  • kick
  • managechannels
  • manageemojis
  • managemessages
  • manageroles
  • manageserver
  • managethreads
  • managewebhooks

πŸ“ More info about enabling 2FA can be found in Discord's support article.

Permissions

Permissions allow users to have specific privileges and access in the server. Some permissions can be as basic as allowing users the ability to add reactions to messages while other permissions grant users more administrative actions. These permissions are based on the roles assigned to users in a server and permissions can be assigned per role on both the server level and channel level.

List of Permissions

Following is the list of permissions which are supported in BDFD -

PermissionDescription
addreactionsAllows to react emojis in messages (Doesn't affect existing emojis in messages).
adminGrants all permissions and bypasses all channel permissions overwrites.
attachfilesAllows to upload attachments in channels.
banAllows banning/unbanning members.
changenicknamesAllows editing own server nickname.
connectAllows to join voice/stage channels.
createinstantinviteAllows to create invites.
createprivatethreadsAllows to create private threads.
createpublicthreadsAllows to create public threads.
embedlinksAllows to send embedded content and links in channels.
externalemojisAllows to use custom emojis from a different server.
externalstickersAllows to use custom stickers from a different server.
kickAllows kicking members.
managechannelsAllows to create/delete/modify channels of the server.
manageemojisAllows to create/delete/modify custom emojis and stickers of the server.
manageeventsAllows to create/delete/modify events in the server.
managemessagesAllows deleting messages of other members and pinning/unpinning messages in channels.
managenicknamesAllows to modify server members nicknames.
managerolesAllows to create/delete/modify server roles. It also allows modifying individual channel's permissions.
manageserverAllows to create/modify AutoMod rules, add bots, view invites and change server settings.
managethreadsAllows to create/delete/modify channel threads.
managewebhooksAllows to create/delete/modify channel webhooks.
mentioneveryoneAllows to mention ping @everyone, @here and all server roles.
moderatemembersAllows to timeout/untimeout members. This permission is also known as "Timeout members".
movemembersAllows to move members between voice/stage channels.
priorityspeakerAllows to be easily heard in voice/stage channels.
readmessagehistoryAllows to view channel message history.
readmessagesAllows to view a channel. This permission is also known as "View channel".
requesttospeakAllows to request to speak in stage.
sendmessagesAllows to send messages in channels.
sendmessagesinthreadsAllows to send messages in threads.
slashcommandsAllows to use application commands (i.e slash commands, context-menus) in channels. This permission is also known as "Use Application Commands".
speakAllows to speak in voice/stage channel.
streamAllows to stream live in voice/stage channels.
ttsAllows to send text-to-speech (tts) messages.
usevadAllows to use voice-activity detection. Members without this permission will have to use push-to-talk voice feature. This permission is also known as "Use voice activity".
viewauditlogAllows to view server audit logs.
viewguildinsightsAllows to view insights of a server.
voicedeafenAllows to deafen a member in voice/stage channel.
voicemuteAllows to mute a member from speaking in voice/stage channel.

πŸ“ All permissions are case insensitive (i.e both BAN and Ban will work).

Security

Security is an important topic to discuss. If security measures are disregarded, your bot and/or account could be at risk of being hacked.

This article will share tips about how you can keep your bot and account safe.

Sharing Tokens

Do not share token(s) with anyone. This includes both bot and regular user account tokens. Sharing your bot token with someone (or posting it publicly) grants them full-unlimited access to your editing bot. Sharing your user account token with someone (or posting it publicly) allows them to have full access to your account (even if they don't have your password or email). Once someone has your account or bot's token, there is a high chance of it being used for malicious purposes. For example, stealing personal info, spreading scams, modifying your bot to nuke/raid servers.

The only thing you can do is regenerate your bot's token, but likely, the damage has already been done when you regenerate the token. You can't regenerate user account tokens, in such case you need to; you must contact Discord support for an optimal solution. So please, do not risk sharing your token(s) with anyone. The same applies to your account password, in such case you expose your account password; you should change it in user settings as soon as possible.

πŸ“ If your account is hacked, you should contact Discord for further assistance.

Account 2FA

Bot owners should consider enabling two-factor authentication on their accounts. Learn more about 2FA and why it's essential for bot owners.

Avoid Scams and Untrusted Links/Files

Scam (or "phishing") links put user’s accounts, personal information, and IP addresses in the hands of scammers and hackers. There's some good news, these scams are preventable! This section will discuss how to protect yourself and your friends from harmful scams.

  • Trusted Links are links that can be trusted to visit.
  • Untrusted Links are links that should be avoided.

This sub-section will breakdown how you identify trusted and untrusted links.

  1. Does the link have a weird spelling?

    If a link looks shortened or altered, that usually means it's an untrusted link. For example, discord.com is the official Discord site; while something like dlscird.com is not.

  2. Is it out of context?

    If a user sends you a link that is out of context of your previous discussions (or if you've never talked to them) then you can bet on it being untrustworthy.

  3. Was the link sent by a friend?

    At first glimpse, you'd assume this makes the link more trustworthy. But, it could be that their account has been compromised, so still, be careful when clicking links from friends.

  4. Too good to be true?

    Free Nitro scams are extremely common. If you get a DM from a random user/bot telling you that you won something or can earn Nitro, just disregard it.

  5. Asking for your password/user token?

    If a site is asking for your Discord account informationβ€”don't input it. You should only share your Discord password via Discord's official login page. Discord will never ask for your user token.

System Messages

If a message is official by Discord, there will be a 'system' badge next to the system user's name, like:

image

The following is a list of all official Discord links that are operated by Discord themselves.

  • discordapp.com
  • discordapp.net
  • discord.com
  • discord.dev
  • discord.new
  • discord.gift
  • discord.gifts
  • discord.media
  • discord.gg
  • discord.co
  • discord.app
  • dis.gd
  • watchanimeattheoffice.com

Common Scams

ex1
This scam is using a phishing "steam community" URL, to potentially steal your account details.

ex2
Inviting the bot will cause your server members to be mass DMed, with the same/similar message you got. Also, Nitro Generators break Discord ToS.

ex3
"I reported your steam account on an accident" scam.

Files

Files are like links, treat them with the same care. Avoid downloading non-image/text files. And, don't fall for these types of scams:

image

Maintain a Safe Account

Keep in mind, if your account gets hacked; said hacker will have access to all your bots and their tokens. For more info about setting up a secure account, read Discord's Support Article.

Summary

Never share your account token or password with anyone, the same stands for your bot token(s). Do not visit untrusted sites or download untrusted files. Keep your account safe, as if your account gets hacked; then your bot(s) could be hacked as well.

BDScript

In this section of the wiki, you will learn about the functions that exist in BDScript. Using functions is an integral part of your bot, because thanks to them you will bring functionality to your bot!

Remember that any function starts with a $ sign. For example, $nomention or $ping. It is also worth remembering that the name is case sensitive.

$addCmdReactions

Adds reactions to the message that triggered the command.

Usage

$addCmdReactions[emojis;...]

You can use unicode emojis or emoji IDs, not emoji names. For emoji IDs, the bot must be present in the server, that you are using the emoji from.

Breakdown

  • emojis - The emoji(s) the bot reacts with. Separate emojis using ;.

Unicode Emojis

Do not use emoji names: $addCmdReactions[:smile:]

Use the unicode version: $addCmdReactions[πŸ˜€]

List of unicode emojis: https://getemoji.com

Emoji IDs

  1. Type \:TheEmojiName:
  2. Send the message.
  3. Copy the ID it returns. (The emoji ID should be in this format: <:emojiName:ID>. If the emoji is animated, it should look like this: <a:emojiName:ID>)
  4. Input the emoji ID into $addCmdReactions[]. (e.g $addCmdReactions[<:hollyDab:828628880629825546>])

πŸ“ This method requires Developer Mode enabled!

$addEmoji

Adds an emoji to the server.

Usage

$addEmoji[name;imageURL;returnEmoji (yes/no)]

Breakdown

  • name - The name of the new emoji.
  • imageURL - The image that the emoji showcases. This needs to be a valid image URL.
  • returnEmoji - Whether to show the emoji in the bot's message or not.

Example

$nomention
$argsCheck[>2;Provide all needed arguments! Usage: `!add-emoji (imageURL) (emojiName)`]
Added new emoji: $addEmoji[$replaceText[$message;$message[1];;1];$message[1];yes]

$addField

Adds a field to an embed.

Usage

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

πŸ“ You can create upto a maximum of 25 fields per embed.

Breakdown

  • name - The name of the field. It cannot exceed more than 256 characters.
  • value - The value of the field. It cannot exceed more than 1024 characters.
  • inline - If 'yes', fields will appear in same line. However, if you have more than 3 fields (or the fields are just too long) with inline enabled, the bot will return rows with 3 fields (2 if there is a thumbnail) in each row. 'no' by default. (Optional)
  • index - Adds field to specified embed index number (Optional). Default is 1. (learn more)

πŸ“ Inline fields may not appear inline on some mobile devices.

Examples

Without inline fields

$nomention
$addField[This is the field name! #1;This is the field value! #1]
$addField[This is the field name! #2;This is the field value! #2]
$addField[This is the field name! #3;This is the field value! #3]

example1

With inline fields

$nomention
$addField[This is the field name! #1;This is the field value! #1;yes]
$addField[This is the field name! #2;This is the field value! #2;yes]
$addField[This is the field name! #3;This is the field value! #3;yes]

example2

$addReactions

Adds reactions to the bot's response.

Usage

$addReactions[emojis]

πŸ§™β€β™‚οΈ You can use unicode emojis or emoji IDs, not emoji names. For emoji IDs: The bot must be present in the server, that you are using the emoji from.

Breakdown

  • emojis - The emoji(s) the bot reacts with. Separate emojis using ;.

Unicode Emojis

Do not use emoji names: $addReactions[:smile:]

Use the unicode version: $addReactions[πŸ˜€]

List of unicode emojis: πŸ˜‹ Get Emoji

Emoji IDs

  1. Type \:TheEmojiName:
  2. Send the message.
  3. Copy the ID it returns. (The emoji ID should be in this format: <:emojiName:ID>. If the emoji is animated, it should look like this: <a:emojiName:ID>)
  4. Input the emoji ID into $addReactions[]. (e.g $addReactions[<:hollyDab:828628880629825546>])

πŸ§™β€β™‚οΈ Note: If \:TheEmojiName: doesn't work, try :-:TheEmojiName:. This requires Developer Mode enabled!

$addTimestamp

Adds a timestamp to an embed.

Usage

$addTimestamp[(index)]

Breakdown

  • index - What embed the timestamp should belong to. Default is 1. (learn more)

Example

$description[Hi!]
$footer[That is the timestamp =>]
$addTimestamp

example

$allMembersCount

Returns the total number of users from every server the bot is in.

Usage

$allMembersCount

Example

$nomention
I'm serving $allMembersCount users!

example

$allowMention

Disables replacing mentions in $message with text.

Usage

$allowMention

Example

$nomention
$allowMention
$message

Comparison

This comparison shows a "say" command with and without $allowMention.

With $allowMention

example1

Without $allowMention

example2

$allowRoleMentions

Disables the pings for the roles not provided, which means the role will be 'fake pinged' (the role will be pinged, but users will not get notified of the ping). While, the inputted allowed roles are ones that can be pinged (and it will work like a regular ping).

Usage

$allowRoleMentions[roleIDs]

Breakdown

  • roleIDs - The roles that can be pinged, leave empty to disable pings for every role. Separate role IDs using ;.

Example

$nomention
$allowRoleMentions[]
I'm pinging <@&858376972303204362>, but no one got notified; wow!

example

$allowUserMentions

Disables the pings for the users not provided, which means the user will be 'fake pinged' (the user will be pinged, but the user will not get notified of the ping). While, the inputted allowed users are ones that can be pinged (and it will work like a regular ping).

Usage

$allowUserMentions[userIDs]

Breakdown

  • userIDs - The users that can be pinged, leave empty to disable pings for every user. Separate user IDs using ;.

Example

$nomention
$allowUserMentions[]
Hi <@696368083517964288>! I mentioned you, but you didn't get pinged.

$and

Returns 'true' if every provided condition is true, otherwise 'false' is returned.

Usage

$and[condition1;condition2;etc]

Example

$nomention
$if[$and[$username==noituri;$message==update]==true]
Noit said "Update"!
$endif
$c[The code in the if statement only executes if the user's username is 'noituri', and the message content is 'update'.]

$argCount

Returns how many words (aka arguments/args) are in the provided text.

Usage

$argCount[text]

Breakdown

  • text - The text to get word count from.

Example

$argCount[$message]

πŸ§™β€β™‚οΈ Returns the word count of the user's message.

$argsCheck

When this function is used, the command can only be executed if the user’s message contains a certain amount of arguments (words).

Usage

$argsCheck[how-many;error message]

Breakdown

  • how-many - How many arguments there should be in the user’s message.

πŸ§™β€β™‚οΈ For example, if you want users to have 3 or more arguments in their message; you can use >3. If you want users to have less than 3 arguments in their message, you can use <3. If you want the users to have exactly 3 arguments in their message put 3.

  • error message - The message that the bot will send if the user has too many/little arguments.

Example

$argsCheck[>1;❌ Please provide something for me to say!]
$noMentionMessage

πŸ§™β€β™‚οΈ This example, a !say command; only allows users to run the command if they provided 1 or more argument in their message. If they don't provide any arguments the bot returns β€œβŒ Please provide something for me to say!”.

$author

Adds author text to an embed.

Usage

$author[text;(index)]

Breakdown

  • text - The text that appears in the author text. It cannot exceed more than 256 characters.
  • index - What embed the author text should belong to (Optional). Default is 1. (learn more)

Example

$nomention
$author[This is the author text!]

example

$authorAvatar

Returns the author's avatar URL.

Usage

$authorAvatar

Examples

Example #1

$image[$authorAvatar]

example1

Example #2

πŸ§™β€β™‚οΈ You can use ?size=size at the end of the avatar URL to decrease/increase the image size. Example sizes: 1024, 2048, 4096.

$image[$authorAvatar?size=4096]

example2

$authorIcon

Adds an icon to the author section in the embed.

πŸ§™β€β™‚οΈ $authorIcon can't work without author text ($author).

Usage

$authorIcon[image url;(index)]

Breakdown

  • image url - The image that appears in the author icon. This must be a valid image URL.
  • index - What embed the author icon should belong to (Optional). Default is 1. (learn more)

Example

$nomention
$authorIcon[$authorAvatar]
$author[⬅️ That is the author icon. This is the author text.]

example

$authorID

Returns message's author ID.

Usage

$authorID

Example

$nomention
This command was written by <@$authorID>!

Explanation

Discord uses this format: <@USER_ID> to mention user. For example, let's say that $authorID is equal to 246604909451935745. If we use this: <@$authorID>, it will be replaced with <@246604909451935745> and discord will interpret this as a mention (@Noituri).

$authorOfMessage

Returns the ID of the provided message's author.

Usage

$authorOfMessage[channelID;messageID]

Breakdown

  • channelID - The channel where the message was sent.
  • messageID - The message that the bot returns the author ID for.

πŸ§™β€β™‚οΈ Where do I find message/channel IDs? (click-me)

$authorURL

Adds a hyperlink to the author text.

Usage

$authorURL[url;(index)]

πŸ§™β€β™‚οΈ $authorURL cannot work without $author.

Breakdown

  • url - The link to set as the author hyperlink.
  • index - What embed the author url should belong to (Optional). Default is 1. (learn more)

Example

$nomention
$author[Click me to visit the BDFD website!]
$authorURL[https://botdesignerdiscord.com]

example

(tap on the text to visit the URL)

$ban

Bans the mentioned user.

Usage

$ban[(optional) reason]

Breakdown

  • reason - The reason for this action, which will be sent to the audit-log. Optional.

Examples

Example #1

(without optional fields)

$nomention
$ban
<@$mentioned[1]> was banned!

image

Example #2

(with optional fields)

$nomention
$ban[$noMentionMessage]
<@$mentioned[1]> was banned!

image

$banID

Bans a user using their ID.

Usages

There are three usages of the $banID function.

Usage #1

$banID

Gets the user to ban from the author's message. No reason will be provided in audit logs for the ban.

Usage #2

$banID[reason]

Gets the user to ban from the author's message. The 'reason' will show in audit logs.

Usage #3

(recommended)

$banID[reason;userID]

Gets the user to ban from the 'userID' field. The 'reason' will show up in audit logs. You can also leave the 'reason' field empty to provide no reason.

Example

$nomention
$argsCheck[>1;Please provide a 'user'. Usage: `!ban (user) <reason>`]
$onlyIf[$findUser[$message[1];no]!=;Failed to find user!]
$onlyPerms[ban;You need the 'ban' permission to use that command!]
$banID[$replaceText[$message;$message[1];;1];$findUser[$message[1];no]]
<@$findUser[$message[1];no]> was banned!

πŸ§™β€β™‚οΈ The code above accepts both IDs or mentions to ban a user!

example

$blackListIDs

Blocks certain users from using the command.

Usage

$blackListIDs[userIDs;errorMessage]

Breakdown

  • userIDs - The users to blacklist from using the command. Separate userIDs with ;.

πŸ§™β€β™‚οΈ Please provide real userID(s). Click-me for more info!

  • errorMessage - The message that appears when the user running the command is blacklisted.

Example

$nomention
$blackListIDs[566613317972394004;246604909451935745;❌ You can't use this command!]
Pong! $ping ms

$blackListRoles

Blocks users with certain role(s) from using the command. If the user has any role in the blacklist, they will not be able to run the command. Uses role names instead of role IDs.

Usage

$blackListRoles[roleNames;errorMessage]

Breakdown

  • roleNames - The name(s) of the role(s) to blacklist. Separate role names using ;.
  • errorMessage - The message that appears when the user has a role in the blacklist.

$blackListRolesIDs

Block users with certain roles from using the command. If the user has any role in the blacklist, they will not be able to run the command.

Usage

$blackListRolesIDs[roleIDs;errorMessage]

Breakdown

  • roleIDs - The roles that will be blacklisted. Separate roleIDs using ;.
  • errorMessage - The message that sends if the user has a role in the blacklist.

Example

$nomention
$blackListRolesIDs[730739881072132166;727999173600739398;❌ You aren't allowed to use this command!]
$noMentionMessage

$blackListServers

Disables this command for the provided servers.

Usage

$blackListServers[serverIDs;errorMessage]

Breakdown

  • serverIDs - The servers to blacklist. Separate server IDs using ;.

πŸ§™β€β™‚οΈ Where do I find server IDs? (click-me)

  • errorMessage - The error to display when the server is blacklisted.

$blackListUsers

Disables the command for users with usernames matching the ones provided.

Usage

$blackListUsers[usernames;errorMessage]

Breakdown

  • usernames - The usernames to blacklist. Separate names using ;.
  • errorMessage - Message when user's name is in the blacklist.

$botCommands

Returns a list of the bot's commands.

Usage

$botCommands[separator]

Breakdown

  • separator - Will be used to separate each command.

Example

$nomention
$botCommands[πŸ”Ή]

image

$botID

Returns the bot's ID.

Usage

$botID

Example

$nomention
My ID is: $botID

example

$botLeave

Forces the bot to leave a server.

Usages

  • There are 2 usages for the $botLeave command.

Usage #1

$botLeave - Forces the bot to leave the server that the command is being ran in.

Usage #2

$botLeave[SERVER ID] - Makes the bot leave the server matching the server ID provided.

$botListDescription

Sets the description of this command, for the BDL command list (if the bot is on Bot Designer List).

Usage

$botListDescription[text]

Breakdown

  • text - The text that description is set to.

Example

$nomention
Pong!
$botListDescription[Ping? Pong!]

$botListHide

Hides this command from being shown on the BDL command list (if the bot is on Bot Designer List).

Usage

$botListHide

Example

This is a secret command! 🀫
$botListHide

$botNode

Returns the bot's node ID

Usage

$botNode

Example

$nomention
$botNode

πŸ§™πŸ»β€β™‚οΈ See list of Nodes and Status, Click here.

$botTyping

$botTyping tells Discord that the bot is typing. When you use a command with $botTyping in it, something like this:

image

should appear.

Usage

$botTyping

$c

Adds a comment to the code. Comments do not appear in the bot's response.

Usage

$c[comment]

Example

$nomention
$noMentionMessage
$c[This is a say command. You are reading a comment!]

example

$calculate

Calculates a math expression.

Usage

$calculate[expression]

Breakdown

  • expression - The math expression to solve.

Signs

  • + - Addition.
  • - - Subtraction.
  • / - Division.
  • * - Multiplication.
  • % - Modulo.
  • () - Parentheses you can put equations in.

Example

$nomention
$calculate[$message] 🧠

example

$changeCooldownTime

Changes the cooldown metrics for %time-d%, %time-h%, %time-m%, and %time-s%. These can be used in cooldown error messages, its useful for translating.

Usage

$changeCooldownTime[days;hours;minutes;seconds]

Breakdown

  • days - The text to replace 'Days' with.
  • hours - The text to replace 'Hours' with.
  • minutes - The text to replace 'Minutes' with.
  • seconds - The text to replace 'Seconds' with.

Example

Hi!
$changeCooldownTime[Days;Hours;Mins;Secs]
$cooldown[10m;Please wait %time-m%!]

$changeUsername

Changes the mentioned user's nickname.

Usage

$changeUsername[newNickname]

Breakdown

  • newNickname - The text to change the user's nickname to. It cannot exceed more than 32 characters.

Example

$onlyPerms[managenicknames;Missing permission 'manage nicknames'!]
$argsCheck[>2;Wrong usage! Correct Usage: `!nickname (user) (text)`]
$changeUsername[$noMentionMessage]
Changed <@$mentioned[1]>'s nickname to `$noMentionMessage`.

example

$changeUsernameWithID

Changes a user's nickname using their ID.

Usage

$changeUsernameWithID[userID;newNickname]

Breakdown

  • userID - The ID of the user which is getting their nickname changed.
  • newNickname - The text to change the user's nickname to. It cannot exceed more than 32 characters.

Example

$argsCheck[>1;Please provide text!]
$changeUsernameWithID[$authorID;$message]

πŸ§™β€β™‚οΈ This changes the author's nickname.

$channelCount

Returns the amount of channels in the current server.

Usage

$channelCount

Example

$nomention
There are $channelCount channels in this server!

image

$channelExists

Checks if the channel provided actually exists.

πŸ§™β€β™‚οΈ 'true' means the channel does exist, 'false' means it doesn't.

Usage

$channelExists[channelID]

Breakdown

  • channelID - The "channel" which the bot checks.

$channelID

Returns a channel's ID.

Usages

There are two usages of the $channelID function.

Usage #1

$channelID - Gets the ID of the current channel.

Usage #2

$channelID[channelName] - Gets the ID of the channel which matched 'channelName'.

$channelName

Returns a channel's name.

Usage

$channelName[channelID]

Breakdown

  • channelID - The channel that the bot gets the channel name from.

πŸ§™β€β™‚οΈ How do I find channel IDs? (click-me)

Example

$channelName[$channelID]

πŸ§™β€β™‚οΈ This example would return the name of the current channel.

$channelSendMessage

Sends a message in the provided channel.

Usage

$channelSendMessage[channelID;message]

Breakdown

  • channelID - The channel to send the message in.
  • message - The message that gets sent to the channel.

Example

$nomention
$channelSendMessage[835108724846493726;Hello!]

example1

example2

$channelTopic

Returns a channel's topic/description.

Usages

There are two usages of the $channelTopic function.

Usage #1

$channelTopic - Returns the topic of the channel that the command is being used in.

Usage #2

$channelTopic[channelID] - Returns the channel topic of the provided 'channelID'.

Example

$nomention
<#$channelID>'s channel topic is: $channelTopic

example

$channelType

Returns channel type

Usage

$channelType[channel ID]

Example

$nomention
$channelType[$channelID]

$charCount

Gets the amount of characters in the provided 'text'.

Usage

$charCount[text]

Breakdown

  • text - The text to return the character count for.

Example

$charCount[$message]

πŸ§™β€β™‚οΈ This example would return how many characters were in the author's message.

$checkCondition

Checks if a condition is true or false.

Usage

$checkCondition[condition]

Explanation

Simply put, $checkCondition serves as a way to make a custom true or false statement. For example: $checkCondition[$username==Spen], the bot would return "true" if someone named Spen used the command, otherwise it would return "false". However this: $checkCondition[$username!=Spen], would return "false" if someone named Spen used the command, otherwise it would return "true".

Base Usage: $checkCondition[value1(sign)value2]

What's Sign? Replace (sign) with one of these.

  • == - Should be equal
  • != - Should be not equal
  • <- Should be less than (only numbers)
  • >- Should be greater than (only numbers)
  • >= - Should be greater than or equal to (only numbers)
  • <= - Should be less than or equal to (only numbers)

What Are Values?

The value is what the bot is checking. Like one of the examples above: $checkCondition[$username==Spen].

  • value1 is $username
  • sign is ==
  • value2 is Spen

$checkContains

Checks if the 'text' contains at least one of the provided 'phrases'.

Usage

$checkContains[text;phrases]

Breakdown

  • text - The text that will be checked.
  • phrases - The phrases/words the bot will check for in 'text'. Separate phrases using ;.

Example

$nomention
$checkContains[$message;hi;hello]

example

$checkUserPerms

Returns 'true' if a user has all of the provided permissions, otherwise 'false' is returned.

Usage

$checkUserPerms[userID;permissions]

Breakdown

  • userID - The user that the bot checks the permissions for.
  • permissions - The permissions that the bot checks for. Separate permissions using ;.

Example

$nomention
$onlyIf[$checkUserPerms[$authorID;admin]==false;You can't use this command, because you are administrator. F in the chat!] 
You aren't a admin!

example

$clear

Deletes a certain amount of messages.

Usages

There are two usages of the $clear function.

Usage #1

$clear

πŸ“ When using just $clear, the author's message must include a number.

Usage #2

$clear[howMany;(optional) userID;(optional) removePinnedMessages (yes/no)]

Breakdown

  • howMany - How many messages to delete. (max 100)
  • userID - If a userID is provided, the bot will only delete messages from that user. Optional.
  • removePinnedMessages - Decides whether to delete pinned messages or not. Default is 'yes'. Optional.

πŸ“ Discord doesn't allow deleting messages in bulk which are over 2 weeks old.

Example

$nomention
$onlyPerms[managemessages;You need the 'MANAGE_MESSAGES' permission to use that!]
$argsCheck[>1;Please provide how many messages to clear. Usage: !purge (number)]
$clear[$message]

$clearReactions

Removes reactions from the provided message.

Usage

$clearReactions[channelID;messageID;emoji/!all]

Breakdown

  • channelID - The channel that the message belongs to.
  • messageID - The message to remove the reaction from.
  • emoji - The emoji to remove from the message. Use !all to clear all reactions.

$closeTicket

Deletes the ticket channel (has to be created with $newTicket).

Usage

$closeTicket[errorMessage]

Breakdown

  • errorMessage - The error to return if the channel isn't a ticket.

Example

$nomention
$closeTicket[That channel isn't a ticket!]

$color

Sets the embed border color.

Usage

$color[colorHex;(index)]

Breakdown

  • colorHex - The color hex to set the embed border color as. You can also use color integer number.
  • index - What embed the color border should belong to (Optional). Default is 1. (learn more)

Example

$nomention
$description[⬅️ That is the embed color border!]
$color[#673ab7]

example

$colorRole

Changes the color of the mentioned role.

Usage

$colorRole[colorHex]

Breakdown

  • colorHex - The color hex to change the mentioned role color to.

Example

$onlyPerms[manageroles;You need the manage_roles permission to use that!]
$argsCheck[>2;Please provide the needed arguments! The `colorHex` and `role` arguments are needed.]
$colorRole[$noMentionMessage]
βœ… Changed role color!

$commandsCount

Returns how many commands the bot has total.

Usage

$commandsCount

Example

$nomention
I have $commandsCount commands!

example

$cooldown

Sets a cooldown. The user can not run the command again, until the 'duration' is up.

Usage

$cooldown[duration;errorMessage]

Breakdown

  • duration - The duration of this cooldown. (e.g 30s, 3m, 3h, 3d, etc)

  • errorMessage - The message that is returned when the cooldown duration is still ongoing. %time% and other related functions can be used here.

    πŸ“ %time% returns how much time is left on the cooldown.

Example

$nomention
$cooldown[30s;Please wait %time%, then use that command again!]
Hi!

$createChannel

Creates a channel.

Usage

$createChannel[name;type;(optional) categoryID]

Breakdown

  • name - The name to give this channel.

    πŸ“ Channel names can have a maximum of upto 100 characters.

  • type - The channel type. Channel types:

    • category
    • text
    • voice
  • categoryID - The category to put the channel in (if applicable).

Example

$nomention
$createChannel[cool-channel;text]

example1

example1.5

$createRole

Creates a new role.

Usage

$createRole[roleName;colorHex;hoist (yes/no);mentionable (yes/no)]

Breakdown

  • roleName - The name to give the new role.
  • colorHex - The color hex of the new role.
  • hoist - Whether the role should be displayed separately (hoisted) or not. no means the role won't be hoisted, yes means it will.

Example1

  • mentionable - Whether the role should be mentionable by everyone. no means the role won't be mentionable, yes means it will.

Example2

Example

$nomention
$createRole[Cool Role;#FFFF00;yes;no]
Created new role!

example1

example1.5

$creationDate

Gets the creation date of a user, channel, role, etc.

πŸ§™β€β™‚οΈ Date Format of $creationDate is yyyy-mm-dd.

Usage

$creationDate[ID]

Breakdown

  • ID - The channelID/userID/roleID/messageID/serverID to get the creation date for.

Example

$username[$mentioned[1;yes]]'s Creation Date: $creationDate[$mentioned[1;yes]]

example

$cropText

Crops the provided text. If text is cropped then the ending is added at the end of the text.

Usage

$cropText[text;maxCharacters;ending]

Breakdown

  • text - The text to crop.
  • maxCharacters - The maxmium amount of characters, subsequent characters are removed.
  • ending - The text to end the cropped-text with (if the text was cropped).

Example

$nomention
$cropText[$noMentionMessage;100;...]

Example

$customEmoji

Returns a custom emoji.

πŸ§™β€β™‚οΈ Note: We recommend emoji IDs instead of $customEmoji for public bots.

Usage

$customEmoji[emojiName]

Breakdown

  • emojiName - The name of the emoji to return.

Example

$nomention
Hello there! $customEmoji[Wave]

Example

$customID

Can only be used with the $onInteraction callback. Returns the custom ID of this interaction.

Example

!buttons code:

$nomention
Pick a button!
$addButton[no;button1-$authorID;Button #1;primary;no;]
$addButton[no;button2-$authorID;Button #2;primary;no;]

You may remove -$authorID from $addButton[] to allow all users to use the interaction, rather than just the author.

$onInteraction code:

$nomention
$if[$customID==button1-$authorID]
You picked button #1!
$editButton[$customID;Button #1;success;yes;]
$editButton[button2-$authorID;Button #2;danger;yes;]
$endif

$if[$customID==button2-$authorID]
You picked button #2!
$editButton[button1-$authorID;Button #1;danger;yes;]
$editButton[$customID;Button #2;success;yes;]
$endif

You may remove -$authorID from the $if[] statement to allow all users to use the interaction, rather than just the author.

Result

Before pressing a button:

After pressing a button:

$date

Returns the current date.

πŸ§™β€β™‚οΈ You can use $time to change the timezone.

Usage

$date

Example

$nomention
Today's Date: $date

Example

$day

Returns the current day of the month.

πŸ§™β€β™‚οΈ You can use $time to change the timezone.

Usage

$day

Example

$nomention
Today Is: $day

Example

$defer

Defers the interaction (components/slash commands).

This will allow interactions wait up to 15 minutes until the task is finished instead of giving an error after 3 seconds of loading.

Usage

$defer

$deleteChannels

Deletes the provided channel(s).

Usage

$deleteChannels[channelIDs]

Breakdown

  • channels - The channels to delete. Separate channel IDs using ;.

Example

$nomention
$argsCheck[>1;Please mention a channel!]
$onlyPerms[managechannels;You need the manage channels permission to use that!]
Successfully deleted $channelName[$mentionedChannels[1]]!
$deleteChannels[$mentionedChannels[1]]

Example

$deleteChannelsByName

Deletes all channels matching the names provided.

Usage

$deleteChannelsByName[names]

Breakdown

  • names - The name(s) of the channel(s) to delete. Use ; to separate channel names.

$deletecommand

Deletes the author's message.

πŸ§™β€β™‚οΈ The bot must have the manage_messages permission.

Usage

$deletecommand

$deleteIn

Deletes the bot's response in after the provided duration.

Usage

$deleteIn[duration]

Breakdown

  • duration - The time to wait before deleting the message (e.g 3s, 30s, 1m, etc). Max duration is 40m.

Example

$nomention
Hello World!
$deleteIn[3s]

$deleteMessage

Deletes a message

Usage

$deleteMessage[channel ID;message ID]

Breakdown

  • channel ID - The channel ID where the message is.
  • message ID - The ID of the message which will be deleted.

Example

$nomention
$deleteMessage[$channelID;$messageID]
Hello $username!

$deleteRole

Deletes a role.

Usage

$deleteRole[roleID]

Breakdown

  • roleID - The role to delete.

Example

$nomention
$onlyPerms[manageroles;You are missing permissions!]
$argsCheck[>1;Please provide a role to delete!]
$onlyIf[$findRole[$message]!=;Invalid role!]
$deleteRole[$findRole[$message]]
Deleted role!

example1

example2

$description

Adds a description to an embed.

Usage

$description[message;(index)]

Breakdown

  • message - The text to set the description as. It cannot exceed more than 4096 characters.
  • index - What embed the description should belong to (Optional). Default is 1. (learn more)

Example

$nomention
$description[This is a description! 😎]

example

$disableSpecialEscaping

(for advanced users)

Disables escaping for ; and $ (e.g. %{-SEMICOL-}% gets interpeted as a regular ;).

Usage

$disableSpecialEscaping

Example

$nomention
$disableSpecialEscaping 
%{DOL}%replaceText[Hello World!%{-SEMICOL-}%World%{-SEMICOL-}%Planet%{-SEMICOL-}%1]

example

$discriminator

Returns a user's discriminator (the 4 digit number at the end of their username).

Usages

There are two usages of the $discriminator function.

Usage #1

$discriminator[userID]

Breakdown

  • userID - The user to get the discriminator from.

Usage #2

$discriminator[]

Returns the author's discriminator.

Example

$nomention
Hello $username#$discriminator[]!

example

$divide

Divides the provided numbers.

Usage

$divide[numbers]

Breakdown

  • numbers - The numbers to divide. Separate numbers using ;.

Example

$nomention
$argsCheck[>2;❌ Please provide the needed arguments! Usage: `!divide (number1) (number2)`]
Answer: $divide[$message[1];$message[2]]

example

$dm

Direct messages a user.

Usages

There are three possible usages of the $dm function.

Usage #1

$dm

This will send the message to the user that runs the command.

Usage #2

$dm[]

This will send the message to the first mentioned user.

Usage #3

$dm[UserID;...]

This will send the message to every user with given User ID.

Note

If the command fails to send the message, make sure the user allows dm messages from everyone.

$dmChannelID

Retrieves the DM channel ID for the provided user id.

Usage

$dmChannelID[userID]
  • userID - The user for whom to fetch the DM channel ID for

Example

Screenshot_20220812_170857

Screenshot_20220812_171230

$editChannelPerms

Changes permission for mentioned users/roles in this particular channel.

Usage

$editChannelPerms[channel ID;userID/RoleID;permission;...]

Breakdown

  • channel ID - place the ID of the channel to which the roles are modified.
  • userID/RoleID - place the ID of the role or user whose permissions will be modified.
  • permission - the permission(s) to be modified.
    • + - set + to add permission.
    • - - set - to remove the permission.

πŸ§™πŸ»β€β™‚οΈ You can see the available permissions here in Permissions

Example

$nomention
$onlyPerms[managechannels; ❌ You need the manage_channels permission to use that!]

$editChannelPerms[$channelID;$mentionedRoles[1];-sendmessages]
βœ… Now the role cannot send messages

image

$editEmbedIn

Edits the bot's message after the given time, as an embed.

Usage

$editEmbedIn[time;(title;description;footer;color)]

πŸ“ Optional fields can be left empty. At least one embed field (title, description, or footer) needs to be inputted.

Breakdown

  • time - The time to wait before editing the message (e.g 3s, 30s, 10m). Max time is 40 minutes (for premium users, it's 120 minutes). Required.

  • title - The new embed title. Optional.

  • description - The new embed description. Optional.

  • footer - The new embed footer. Optional.

  • color - The embed border color, must be a valid color hex or color integer number. Use 0 for default color. Optional.

Example

$nomention
$title[Cool Title]
$description[This is a cool embed to edit!]
$color[#6A96FC]
$editEmbedIn[5s;Epic Title;This is the edited description!;;#E46AFC]

Output

Before

example1

After

example2

$editIn

Edits the bot's response after the given time.

Usage

$editIn[time;newMessage]

Breakdown

  • time - The time to wait before editing the message (e.g 3s, 30s, 10m). Max is 40m.
  • newMessage - The text that appears when this message is edited.

Example

$nomention
This is a nice message to edit!
$editIn[5s;This is the edited message!]

Output

Before

example1

After

example2

$editMessage

Edits one of the bot's messages.

Usage

$editMessage[channelID;messageID;newMessage;(optional) title;(optional) description;(optional) color;(optional) footer]

πŸ§™β€β™‚οΈ How Do I Get The Channel / Message ID? (click-me)

Breakdown

  • channelID - The channel that this message belongs to.
  • messageID - The ID of the message to edit (must be a message that the bot sent).
  • newMessage - The new message contents.
  • title - The new embed title. Optional.
  • description - The new embed description. Optional.
  • color - The new embed color border hex. Optional.
  • footer - The new embed footer text. Optional.

Example

$nomention
$editMessage[853070225398693898;857040509549281292;This message has been edited!]

Output

Before

example1

After

example2

$editThread

Modifies a existing thread.

Usage

$editThread[threadID;name;archived (yes/no);archiveDuration (60/1440/4320/10080);locked (yes/no);slowmode (in seconds)]

Breakdown

  • threadID - The thread channel to edit.
  • name - The new name of the thread.
  • archived - Whether to archive this thread or not.
  • archiveDuration - The archive duration of this thread in minutes. Only 60, 1440,4320, 10080 can be used. Note that for the 4320 archive duration option, the server needs to be level 1 boosted, and for 10080 the server needs level 2.
  • locked - Whether to lock this thread or not. Note that archived threads can't be locked.
  • slowmode - The slowmode of this channel, expressed in seconds.

$embeddedURL

Sets the title to be a hyperlink. >πŸ“ Only works if $title is also used.

Usage

$embeddedURL[link;(index)]

Breakdown

  • link - The link to set the title hyperlink to.
  • index - What embed the title hyperlink should belong to (Optional). Default is 1. (learn more)

Example

$nomention
$title[Bot Designer For Discord]
$embeddedURL[https://botdesignerdiscord.com]
$description[Hello World!]
$color[#683cb4]

example

$embedSuppressErrors

Suppresses the error messages, responds with the embed if there is a error.

Usage

$embedSuppressErrors[title;description;color;author;footerText;footerIcon]

πŸ§™β€β™‚οΈ All fields are optional, leave the field empty to not include it. Atleast one field needs to be inputted, however.

$embedSuppressErrors[Error!;There was a error!;;;;] - this is correct. $embedSuppressErrors[Error!;There was a error!] - this is incorrect.

Breakdown

  • title - The title of the embed.
  • description - The embed description.
  • color - The embed border color, must be a valid color hex.
  • author - The embed author text.
  • footerText - The embed footer text.
  • footerIcon - The embed footer icon, must be a valid image URL.

$emoteCount

Returns the number of emojis in the current server.

Usage

$emoteCount

Example

$nomention
There are $emoteCount emojis in $serverName[$guildID]!

example

$enabled

Allows you to enable/disable commands.

Usage

$enabled[enabled (yes/no);errorMessage]

Breakdown

  • enabled - 'yes' means the command is enabled, 'no' means it's disabled.
  • errorMessage - The message that is returned if the command is disabled.

Example

This section will explain how to disable/enable certain commands using server variables.

  1. Create a variable named enabled and set the value to yes or no (whatever you want the default option to be. no - disabled, yes - enabled.)

    example

  2. Create a command for the enable code. Put this in the reply text/code section:

    $onlyAdmin[❌ Only admins can enable commands!]
    $setServerVar[enabled;yes]
    I successfully enabled the __ command!
    
  3. Create a command for the disable code. Put this in the reply text/code section:

    $onlyAdmin[❌ Only admins can disable commands!]
    $setServerVar[enabled;no]
    I successfully disabled __ command!
    
  4. In the command(s) you want the enable/disable to affect, put:

    $enabled[$getServerVar[enabled];❌ This command is disabled!]
    
  5. Now your bot has a system where servers can disable/enable command(s).

πŸ“ In order to make this changeable for multiple commands, you'll need to do it multiple times (using different variable names). As this only affects the commands you put the "affect" code in.

$enableDecimals

Enables/disables decimals in math functions.

Usage

$enableDecimals[enable (yes/no)]

Breakdown

  • enable - Whether to enable decimals in math functions or not.

Explaination

By default, decimals in math functions (e.g $sum, $sub, $multi, etc) are disabled. The only use for this function is to enable decimals, if you want decimals enabled for math functions in that command.

Enabling decimals:

$enableDecimals[yes]

πŸ§™β€β™‚οΈ $calculate ignores $enableDecimals.

$ephemeral

Makes the bot's response ephemeral.

πŸ§™β€β™‚οΈ What are ephemeral responses? (click-me)

Usage

$ephemeral

⚠️ You can get an ephemeral response only through an interaction (Slash commands, button, select menus etc.)

Example

Example2

Example1

$eval

Evaluates the provided BDScript code.

⚠️ Can only be used in BDScript 2, this function should be used with caution.

Usage

$eval[BDScript source code]

Breakdown

  • BDScript source code - The code to be evaluated.

Example

$nomention
$eval[$message]

20220213_124659

It is recommended to restrict the command to be only used by the bot developers, this can be done with $onlyForIDs.

$executionTime

Returns how long the command took to execute, in milliseconds.

Usage

$executionTime

$findChannel

Finds a channel's ID from the given channel name, ID, or mention.

Usage

$findChannel[channel]

Breakdown

  • channel - The channel name/ID/mention to find.

Example

$nomention
$findChannel[$message]

example

$findRole

Finds a role's ID using the given role name, ID, or mention.

Usage

$findRole[role]

Breakdown

  • role - The role name, ID, or mention to find.

Example

$nomention
$findRole[$message]

example

$findUser

Finds a user's ID using username, ID, or mention.

Usage

$findUser[user;(optional) returnAuthorID (yes/no)]

Breakdown

  • user - The user's username, ID, or mention to find.
  • returnAuthorID - Whether to return the author ID if no user was found. Default is yes. Optional.

Example

$nomention
$findUser[$message]

example

$footer

Sets the embed footer text.

Usage

$footer[text;(index)]

Breakdown

  • text - The text to set the footer as. It cannot exceed more than 2048 characters.
  • index - What embed the footer text should belong to (Optional). Default is 1. (learn more)

Example

$nomention
$footer[Hi! I'm a footer.]

example

$footerIcon

Sets the embed footer icon.

πŸ§™β€β™‚οΈ There must be footer text in order to set the footer icon.

Usage

$footerIcon[icon url;(index)]

Breakdown

  • icon url - The URL to set the footer icon as. Must be a valid image URL.
  • index - What embed the footer icon should belong to (Optional). Default is 1. (learn more)

Example

$nomention
$footer[⬅️ That is a footer icon!]
$footerIcon[$authorAvatar]

example

$getBotInvite

Returns the bot's invite URL.

Usage

$getBotInvite

Example

$nomention
Invite Me! $getBotInvite

example

$getCooldown

Returns how long is left on the cooldown, in seconds; can be used in the 'errorMessage' field of cooldown functions.

Usage

$getCooldown[cooldownType (normal/server/global)]

Breakdown

Example

$nomention
$cooldown[1h;You're on cooldown! (<t:$sum[$getTimestamp;$getCooldown[normal]]>)]
Hello World!
$c[This example should be used in BDScript 2 only.]

$getEmbedData

Fetches embed data from the provided message.

Usage

$getEmbedData[channelID;messageID;embedIndex;embedProperty (title/description/footer/color/image/timestamp)]

Breakdown

  • channelID - The channel this message belongs to.
  • messageID - The message to get this embed data from.
  • embedIndex - The embed of this message to get data from. Use 1 for the first embed of this message.
  • embedProperty - The embed property to return.

Example

$nomention
Title: $getEmbedData[876920205526319144;878299081380876339;1;title]
Description: $getEmbedData[876920205526319144;878299081380876339;1;description]
Footer: $getEmbedData[876920205526319144;878299081380876339;1;footer]

example

$getInviteInfo

Returns information about a invite code.

Usage

$getInviteInfo[inviteCode;inviteProperty]

Breakdown

  • inviteCode - The invite code to get info about.

  • inviteProperty - The information to get about this invite. Invite properties:

    • channel - The channel that this invite is for.
    • creationDate - The creation date of this invite.
    • inviter - The ID of the user who created this invite.
    • isTemporary - Whether or not this invite is temporary.
    • uses - How many times this invite has been used.

Example

$nomention
$argsCheck[>1;Please provide a valid invite code!]
$title[Invite Info]
$description[Uses: $getInviteInfo[$message;uses]
Channel: $getInviteInfo[$message;channel]
Date: $getInviteInfo[$message;creationDate]
Inviter: $getInviteInfo[$message;inviter]
Temporary: $getInviteInfo[$message;isTemporary]]
$color[#673ab7]

Example

$getLeaderboardValue

Gets a leaderboard value.

Usage

$getLeaderboardValue[variableType (user/globalUser/server);variableName;sortType (asc/desc);position;(optional) returnType (id/value)]
  • variableType - The variable type.
  • variableName - The variable name to generate the leaderboard for.
  • sortType - Whether to sort the values in ascending (asc) or descending (desc) order.
  • position - The leaderboard position to get, e.g 1, 3, etc.
  • returnType - The return type. Types:
    • none - If this field is excluded, it will return Username - Value.
    • id - Returns the ID of the user belonging this position.
    • value - Returns the variable value of this position.

Example

$nomention
$title[**Global Leaderboard**]
$description[#1 - $getLeaderboardValue[globalUser;Money;asc;1]
#2 - $getLeaderboardValue[globalUser;Money;asc;2]
#3 - $getLeaderboardValue[globalUser;Money;asc;3]
#4 - $getLeaderboardValue[globalUser;Money;asc;4]
#5 - $getLeaderboardValue[globalUser;Money;asc;5]
#6 - $getLeaderboardValue[globalUser;Money;asc;6]
#7 - $getLeaderboardValue[globalUser;Money;asc;7]
#8 - $getLeaderboardValue[globalUser;Money;asc;8]
#9 - $getLeaderboardValue[globalUser;Money;asc;9]
#10 - $getLeaderboardValue[globalUser;Money;asc;10]]
$color[FFFF00]
$c[This is for global-user variables.]

$getMessage

Gets data from a message, with the provided message and channel IDs.

Usage

$getMessage[channelID;messageID;(optional) property]

Breakdown

  • channelID - The channel that this message belongs to.
  • messageID - The message to get the data from.
  • property - The message data to get. Default is content. Message properties:
    • content - The content of this message.
    • authorID - The ID of the message author.
    • username - The username of the message author.
    • avatar - The avatar of the message author.

Example

$nomention
$argsCheck[>2;Please provide a channel and message ID! Usage: `!quote (channel) (messageID)`]
$description[$getMessage[$findChannel[$message[1]];$message[2]]]
$color[#673ab7]
$authorIcon[$getMessage[$findChannel[$message[1]];$message[2];avatar]]
$author[$getMessage[$findChannel[$message[1]];$message[2];username]#$discriminator[$getMessage[$findChannel[$message[1]];$message[2];authorID]]]

example

$getReactions

Returns a list of users separated by separator that reacted to a message.

Usage

$getReactions[channelID;messageID;separator;emoji]

Breakdown

  • channelID - The channel that the message belongs to.
  • messageID - The message to get the user-reactions from.
  • separator - The separator between each user.
  • emoji - The emoji to get the user's reactions for.

Example

$nomention
$getReactions[2394734883474774;38483494328934989;, ;<:tip:3943484884834848483>]

example

$getRoleColor

Returns a role's color hex.

Usage

$getRoleColor[roleID]

Breakdown

  • roleID - The role to get the color hex from.

Example

$nomention
$description[<@$authorID>'s color: `#$getRoleColor[$highestRole[$authorID]]`]
$color[$getRoleColor[$highestRole[$authorID]]]

example

$getServerInvite

Gets a server's invite URL.

Usages

There are two usages of the $getServerInvite function.

Usage #1

$getServerInvite

Returns a invite to the current server.

Usage #2

$getServerInvite[guildID]

Returns a invite URL for the server provided.

πŸ§™β€β™‚οΈ Note: The bot must be in the provided server for it to create a invite.

πŸ§™β€β™‚οΈ How do I find a server/guild ID? (click-me)

$getServerVar

Returns the value of the provided server variable.

Usage

$getServerVar[variableName;(optional) guildID]

Breakdown

  • variableName - The name of the variable to get.
  • guildID - The server to get the value for. If no guildID is inputted, then the current server is used.

$getTextSplitIndex

Retrieves index from the provided value in $textSplit. Returns -1 if it couldn't find the value.

Usage

$getTextSplitIndex[value]

Breakdown

  • value - The value to search in the text split.

Example

$nomention 
$textSplit[Cake-Bread;-] 
$getTextSplitIndex[$message[1]] 

image

See more in the Text Splitting guide...

$getTextSplitLength

Returns the number of splits in $textSplit.

πŸ§™β€β™‚οΈ This function can't be used, if $textSplit isn't present in the code.

Usage

$getTextSplitLength

See more in the Text Splitting guide...

$getTimestamp

Returns current unix timestamp.

Usage

There are two usages of $getTimestamp function :

Usage #1

$getTimestamp

Returns unix timestamp in seconds.

Example

$nomention
Unix Timestamp: $getTimestamp

example

Usage #2

$getTimestamp[Time unit]
  • Time unit - Sets timestamp time unit

    πŸ“ Time unit value can either be :

    • s (seconds)
    • ms (milliseconds)
    • ns (nanoseconds)

Example

$nomention
Unix Timestamp
 In Seconds - $getTimestamp[s]
 In Milliseconds - $getTimestamp[ms]
 In Nanoseconds - $getTimestamp[ns]

Screenshot_20220904_150511

$getUserStatus

Returns the provided user's status.

πŸ§™β€β™‚οΈ The user must share atleast 1 server with the bot, for this function to work.

Usage

$getUserStatus[userID]

Breakdown

  • userID - The user to get the status for.

Statuses List

  • online
  • dnd
  • idle
  • offline

Example

$nomention
$nickname[$mentioned[1;yes]]'s status is: $getUserStatus[$mentioned[1;yes]]

example

$getUserVar

Returns a local-user variable value.

Usage

$getUserVar[variableName;(userID;guildID)]

Breakdown

  • variableName - The name of the variable to get.
  • userID - The user to get the variable value for. If no user is provided, the author is used.
  • guildID - The guild to get the variable value for. If no guild is provided, current guild is used.

Example

$nomention
<@$mentioned[1;yes]> has $getUserVar[Money;$mentioned[1;yes]] coins.

example

$getVar

Gets a global/global-user variable.

Usage

$getVar[variableName;(optional) userID]

πŸ§™β€β™‚οΈ For a global variable, a userID doesn't need to be provided. For a global-user variable, userID must be provided.

Breakdown

  • variableName - The name of the variable to get the value from.
  • userID - The user to get the value for (if global-user).

Example

$nomention
You have $getVar[Money;$mentioned[1;yes]] coins!

example

Additional Reading

Check our Variable Guide!

$giveRole

(deprecated)

πŸ§™β€β™‚οΈ This command is deprecated instead better use $roleGrant.

Adds a role to the provided user.

Usages

There are two usages of the $giveRole function.

Usage #1

$giveRole[userID;roleID]

Gives a role to the provided user.

Breakdown

  • userID - The user to give the role to.
  • roleID - The role to give the user.

Usage #2

$giveRole[roleID]

Gives the provided role to the mentioned user.

Breakdown

  • roleID - The role to give the mentioned user.

Example

$onlyPerms[manageroles;Missing permissions!]
$giveRole[807004801753284618]
Added $roleName[807004801753284618] to $username[$mentioned[1]]!

example

$globalCooldown

Applies a cooldown to the command, the user can not run the command in any server until the 'duration' is up. (Unlike $cooldown, which only applies the cooldown to the user in the current server)

Usage

$globalCooldown[duration;errorMessage]

Breakdown

  • duration - The duration until the user can use this command again.
  • errorMessage - The message to return when the cooldown duration is still ongoing.

πŸ§™β€β™‚οΈ You can use %time% to get how much time is left until the cooldown is over, in the 'errorMessage'.

$globalUserLeaderboard

Returns the top ten user's username and value for the given global-user variable.

Usage

$globalUserLeaderboard[variableName;sortType (asc/desc)]

Breakdown

  • variableName - The variable to create the leaderboard for.
  • sortType - Whether to sort the leaderboard in ascending (asc) or descending (desc) order.

πŸ§™β€β™‚οΈ $globalUserLeaderboard automatically generates a description. So, $description should not be used in the code.

Example

$nomention
$globalUserLeaderboard[Money;asc]

$guildExists

Returns 'true' if the provided server exists, otherwise 'false' is returned. Returns 'false' if the bot isn't present in the server.

Usage

$guildExists[guildID]

Breakdown

  • guildID - The ID of the hypothetical server.

$guildID

Returns a server/guild's ID.

Usages

There are two usages of the $guildID function.

Usage #1

$guildID - Returns the current server's ID.

Usage #2

$guildID[serverName] - Finds a server ID using the server name.

πŸ§™β€β™‚οΈ Note: The bot can not find the ID of a server that it isn't in.

$hasRole

Returns whether or not a user has the provided role.

πŸ§™β€β™‚οΈ 'true' means the user has the role, 'false' means they don't.

Usage

$hasRole[userID;roleID]

Breakdown

  • userID - The user to check for the role.
  • roleID - The role that the bot is checking the user for.

Example

$nomention
$hasRole[$authorID;858376972303204362]

example

$highestRole

Returns the ID of the users/servers highest role (according to it's position).

Usages

There are two usages of the $highestRole function.

Usage #1

$highestRole

Returns the highest role in the server.

Usage #2

$highestRole[userID]

Returns the user's highest role.

Example

$nomention
$username[$mentioned[1;yes]]'s highest role: $roleName[$highestRole[$mentioned[1;yes]]] ($highestRole[$mentioned[1;yes]])

example

$highestRoleWithPerms

Returns the highest role in the server that has all the provided permissions.

Usage

$highestRoleWithPerms[permissions]

Breakdown

Example

$nomention
Highest Role with Administrator:  $roleName[$highestRoleWithPerms[admin]] ($highestRoleWithPerms[admin])

example

$hostingExpireTime

Returns expire time for the hosting

Usage

$hostingExpireTime[(unix timestamp?)]

Breakdown

  • unix timestamp - Whether to return the expire time in Unix Timestamp or not.

Example #1

$nomention 
$hostingExpireTime 

image

Example #2

$nomention
I will be offline <t:$hostingExpireTime[yes]:R>

20220212_081740

$hour

Returns the current minute.

πŸ§™β€β™‚οΈ You can use $time to change the timezone.

Note: The $hour function uses the twenty-four-hour clock instead of two groups of twelve hours; this also known as, Military Time.

Usage

$hour

Example

$nomention
Current Hour: $hour

Example

$hypesquad

Returns the hypesquad name of the provided user

Usage


$hypesquad[userID]

Breakdown

  • userID - ID of the user whose hypesquad name should be returned

Example

$nomention
You are in $hypesquad[$authorID] house.

Screenshot_20220831_101316

$ignoreChannels

The command can't be executed in any of the provided channels. If the channel is ignored, then the 'errorMessage' is returned.

Usage

$ignoreChannels[channelIDs;errorMessage]

Breakdown

  • channelIDs - The channels to ignore. Separate IDs using ;.
  • errorMessage - The message that is returned when the channel is ignored.

$image

Adds a image to the embed.

Usage

$image[image url;(index)]

Breakdown

  • image url - The URL of the image that appears. Must be a valid image URL.
  • index - What embed the image should belong to (Optional). Default is 1. (learn more)

Example

$nomention
$image[$userAvatar[$botID]]

example

$isAdmin

Returns whether or not the provided user has the administrator permission.

πŸ§™β€β™‚οΈ 'true' means the user has the administrator permission, 'false' means they don't.

Usage

$isAdmin[userID]

Breakdown

  • userID - The user to check.

Example

$nomention
Are You A Admin?: `$isAdmin[$authorID]`

example

$isBanned

Returns 'true' if user is banned, otherwise it returns 'false'. Requires 'BAN_MEMBERS' permission

Usage

$isBanned[user ID]

Example

$nomention
$isBanned[$mentioned[1]]

$isBoolean

Returns whether or not the provided 'text' is a boolean.

πŸ§™β€β™‚οΈ 'true' means the text is a boolean, 'false' means it isn't.

Supported Booleans

PositiveNegative
truefalse
yesno
onoff
enabledisable

Usage

$isBoolean[text]

Breakdown

  • text - The text to check.

Example

$nomention
$isBoolean[$message]

example

$isBot

Returns whether or not the provided user is a bot.

πŸ§™β€β™‚οΈ 'true' means the user is a bot, 'false' means the user is not a bot.

Usage

$isBot[userID]

Breakdown

  • userID - The user to check.

Example

$nomention
Bot? $isBot[$findUser[$message]]

image

$isHoisted

Returns if a role is displayed separately.

πŸ§™β€β™‚οΈ 'true' means the role is hoisted, 'false' means the role isn't hoisted.

Usage

$isHoisted[roleID]

Breakdown

  • roleID - The role which the bot checks is hoisted or not.

Example

$nomention
$isHoisted[$findRole[$message]]

example

$isMentionable

Returns whether or not a role is mentionable by everyone.

πŸ§™β€β™‚οΈ 'true' means the role is mentionable, 'false' means it isn't.

setting

Usage

$isMentionable[roleID]

Breakdown

  • roleID - The role which the bot checks is mentionable or not.

Example

$nomention
$isMentionable[$findRole[$message]]

example

$isNSFW

Returns whether the provided channel is NSFW (not-safe-for-work) or not.

πŸ§™β€β™‚οΈ 'true' means the channel is NSFW, 'false' means it isn't.

Usage

$isNSFW[channelID]

Breakdown

  • channelID - The channel to check.

Example

$nomention
Is <#$channelID> NSFW?: `$isNSFW[$channelID]`

example

$isNumber

Returns whether or not the provided value is a number.

πŸ§™β€β™‚οΈ 'true' means the value is a number, 'false' means it isn't.

Usage

$isNumber[value]

Breakdown

  • value - The text to check.

Example

$nomention
$isNumber[$message]

example

$isSlash

Returns whether the command was ran as a slash command or not.

πŸ§™β€β™‚οΈ 'true' means the command was ran as a slash command, 'false' means it wasn't.

Usage

$isSlash

Example

$nomention
$if[$isSlash==true]
$message[text]
$else
$message
$endif

example

$isUserDMEnabled

Checks whether or not the bot can DM the user.

πŸ§™β€β™‚οΈ 'true' means the bot can DM the user, 'false' means it can't.

Usage

$isUserDMEnabled[userID]

Breakdown

  • userID - The user to check the DM status for.

Example

$nomention
$onlyIf[$isUserDMEnabled[$authorID]==true;❌ Failed to DM you. Make sure you have your DMs on!]
$dm
$message

example

$isValidHex

Checks if given color hex is valid.

πŸ§™β€β™‚οΈ 'true' means the color hex is valid, 'false' means it isn't.

Usage

$isValidHex[colorHex]

Breakdown

$joinSplitText

Joins $textSplit values with provided separator.

Usage

$joinSplitText[separator]

Breakdown

  • separator - The separator to be put between the text split values.

See more in the Text Splitting guide...

$kick

Kicks a user.

Usages

There are two usages of the $kick function.

Usage #1

$kick

Kicks the user who ran the command.

Usage #2

$kick[userID;(optional) reason]

Kicks the provided user.

Breakdown

  • userID - The user to kick from the server.
  • reason - The audit-log reason for the kick. Optional.

Example

$nomention
$onlyPerms[kick;❌ You need the `kick` permission to use that!]
$argsCheck[>1;❌ Please provide a user to kick. Usage: `!kick (user) <reason>`.]
$kick[$mentioned[1];$noMentionMessage]
βœ… Kicked `$username[$mentioned[1]]#$discriminator[$mentioned[1]]`!

example

$kickMention

A simplified version of $kick. Kicks the mentioned user, the user running the command must have the 'kick' permission.

Usage

$kickMention[(optional) reason]

Breakdown

  • reason - The audit-log reason for the kick. Optional.

Example

$nomention
$kickMention[$noMentionMessage]
βœ… Kicked `$username[$mentioned[1]]#$discriminator[$mentioned[1]]`!

example

$lowestRole

Returns the ID of the users/servers lowest role (according to it's position).

Usages

There are two usages of the $lowestRole function.

Usage #1

$lowestRole

Returns the lowest role in the server.

Usage #2

$lowestRole[userID]

Returns the user's lowest role.

Example

$nomention
$username[$mentioned[1;yes]]'s lowest role: $roleName[$lowestRole[$mentioned[1;yes]]] ($lowestRole[$mentioned[1;yes]])

example

$lowestRoleWithPerms

Returns the lowest role in the server that has all the provided permissions.

Usage

$lowestRoleWithPerms[permissions;...]

Breakdown

  • permissions - The permissions that the role needs to have. (see permissions list). Use ; as separator for multiple permissions

Example

$nomention
Lowest Role with Administrator:  $roleName[$lowestRoleWithPerms[admin]] ($lowestRoleWithPerms[admin])

example

$max

Returns the largest number from the provided numbers.

Usage

$max[numbers]

Breakdown

  • numbers - The numbers to get the data from. Separate numbers using ;.

Example

$nomention
$max[100;20;50]

example

$membersCount

This command returns number of members.

First usage of the command

$membersCount - returns amount of members in current guild

Second usage

$membersCount[presence] - returns amount of members that have their presences set to provided presence. For example if you will use $membersCount[online] it will show you amount of online members.

Available presences:

  • online
  • offline
  • idle
  • dnd
  • invisible

$mentioned

Returns the ID of the mentioned user.

Usage

$mentioned[mentionNumber;(optional) returnAuthor (yes/no)]

Breakdown

  • mentionNumber - The user-mention to get from the author's message (1 = first user-mention, 2 = second, etc).
  • returnAuthor - Whether to return the author's ID if no user is mentioned or not.

Example

$nomention
$mentioned[1]

example

$mentionedChannels

Returns the ID of the mentioned channel.

Usage

$mentionedChannels[mentionNumber;(optional) returnCurrent (yes/no)]

Breakdown

  • mentionNumber - The channel-mention to get from the author's message (1 = first channel-mention, 2 = second, etc).
  • returnCurrent - Whether to return the current channel ID if no channel is mentioned or not.

Example

$nomention
$mentionedChannels[1]

example

$mentionedRoles

Returns the ID of the mentioned role.

Usage

$mentionedRoles[mentionNumber]

Breakdown

  • mentionNumber - The role-mention to get from the author's message (1 = first role-mention, 2 = second, etc).

Example

$nomention
$mentionedRoles[1]

example

$message

Returns the user's message (without the command trigger).

Usages

There are two usages of the the $message function.

Usage #1

$message

Returns the user's message.

Usage #2

$message[argumentNumber]

Returns the argument matching the provided number.

  • For example, $message[1] would just return the first word of the message.
  • You can also use $message[>] to get the last argument/word of the user's message.

Optimization

Find info about optimizing $message[] for slash commands here.

$messageID

Returns the ID of the author's message.

πŸ“ If $messageID is written in $onInteraction commands, it will return bot's message ID.

Usage

$messageID

Example

$nomention
$messageID

example

$min

Returns the smallest number from the provided numbers.

Usage

$min[numbers]

Breakdown

  • numbers - The numbers to get the data from. Separate numbers using ;.

Example

$nomention
$min[3;5;1]

example

$minute

Returns the current minute of this hour.

πŸ§™β€β™‚οΈ You can use $time to change the timezone.

Usage

$minute

Example

$nomention
Current Minute: $minute

example

$modifyChannel

Edits a channel with the data provided.

πŸ§™β€β™‚οΈ You can use !unchanged as a argument for the option to remain in its current state.

Usages

There are two usages of the $modifyChannel function.

Usage #1

$modifyChannel[channelID;channelName;topic;NSFW (yes/no);position]

Breakdown

  • channelID - The channel the bot will edit.
  • channelName - The new channel name.
  • topic - The new channel topic/description.
  • NSFW - Whether the channel will be marked as NSFW or not.
  • position - The new channel position (1 = top).

Usage #2

$modifyChannel[channelID;channelName;topic;NSFW (yes/no);position;categoryID]

Breakdown

Same usage as the first. The only new option is categoryID. This will choose what category the channel is put in.

πŸ§™β€β™‚οΈ You can use $channelID[category/channelName] to get the ID of a category or channel.

Example

For this example, we will be changing the channel name from 'general' to 'chill-chat'. As well as changing the channel topic to 'A chill chat!'.

$nomention
$modifyChannel[$channelID[general];chill-chat;A chill chat!;!unchanged;!unchanged]

$modifyChannelPerms

(deprecated)

πŸ§™β€β™‚οΈ This command is deprecated instead better use $editChannelPerms.

Modifies a channel's permissions.

Usage

$modifyChannelPerms[channelID;permissions;userID/roleID]

Breakdown

  • channelID - The channel to change the permissions for.
  • permissions - The permissions to add/remove. + means allow, - means deny, / means neutral permission.
  • userID/roleID - The role or user to modify the permissions for. Use $guildID for @everyone.

Example

Lock:

$nomention
$onlyPerms[managechannels;❌ You need the manage_channels permission to use that!]
βœ… Successfully locked <#$mentionedChannels[1;yes]>!
$modifyChannelPerms[$mentionedChannels[1;yes];-sendmessages;$guildID]

example1

Unlock:

$nomention
$onlyPerms[managechannels;❌ You need the manage_channels permission to use that!]
βœ… Successfully unlocked <#$mentionedChannels[1;yes]>!
$modifyChannelPerms[$mentionedChannels[1;yes];+sendmessages;$guildID]

example2

$modifyRole

Modifies a role.

Usage

$modifyRole[roleID;roleName;colorHex;hoisted (yes/no);mentionable (yes/no)]

πŸ§™β€β™‚οΈ You can use !unchanged as a argument to leave the setting as-is.

Breakdown

  • roleID - The ID of the role to modify.
  • roleName - The new role name.
  • colorHex - The new role color.
  • hoisted - Whether the role should be displayed separately or not.
  • mentionable - Whether the role should be mentionable by everyone or not.

Example

$nomention
$argsCheck[>2;❌ Please provide the needed arguments! Usage: `!role-name (role) (newRoleName)`]
$onlyPerms[manageroles;❌ You are missing the manage_roles permission!]
$modifyRole[$findRole[$message[1]];$replaceText[$message;$message[1];;1];!unchanged;!unchanged;!unchanged]
$description[βœ… Changed role name of <@&$findRole[$message[1]]>]

example

$modifyRolePerms

Modifies a role's permissions.

Usage

$modifyRolePerms[roleID;permissions]

Breakdown

  • roleID - The role to modify the permissions for. Use $guildID for the @everyone role.
  • permissions - The permissions to toggle, separate permissions using ;.

$modulo

Returns remainder between numbers.

Usage

$modulo[numbers]

Breakdown

  • numbers - The numbers to return the remainder for. Separate numbers using ;.

Example

$nomention
$argsCheck[>2;❌ Invalid usage. Usage: `!modulo (number1) (number2)`]
$modulo[$message[1];$message[2]]

example

$month

Returns the current month of this year.

πŸ§™β€β™‚οΈ You can use $time to change the timezone.

Usage

$month

Example

$nomention
Current Month: $month

example

$multi

Muliplies the provided numbers.

Usage

$multi[numbers]

Breakdown

  • numbers - The numbers to multiply, separate numbers using ;.

Example

$nomention
$argsCheck[>2;❌ Invalid usage. Usage: `!multiply (number1) (number2)`]
$multi[$message[1];$message[2]]

example

$mute

(deprecated)

πŸ§™β€β™‚οΈ This command is deprecated instead better use $timeout.

Mutes the mentioned user.

Usage

$mute[mutedRoleName]

Breakdown

  • mutedRoleName - The name of the 'Muted' role (case sensitive).

Example

$nomention
$onlyPerms[manageroles;❌ You are missing permission: `MANAGE_ROLES`.]
$mute[Muted]
βœ… Successfully muted $username[$mentioned[1]]#$discriminator[$mentioned[1]]!

example

$newTicket

Creates a new ticket.

Usage

$newTicket[categoryID/name;messageWhenNoSubject;MessageInTicket;MessageToUser;errorMessage;(ticket number;(yes/no) return id of the ticket message)]

Breakdown

  • categoryID/name - The category to put the ticket channels in. Can be a category ID or name.

πŸ§™β€β™‚οΈ Setup the ticket category permissions: tickets

  • messageWhenNoSubject - The message that appears in {subject} when the user doesn't provide a subject.
  • messageInTicket - The message that is sent in the new ticket channel.
  • messageToUser - The message that gets sent in the current channel.
  • errorMessage - The message that gets returned when the ticket can't be created.
  • ticket number - For custom ticket number.
  • return id of the ticket message - (yes/no) Whether you want the ticket message to return it's id.

Subset Functions

You can use these subset functions in $newTicket.

  • {subject} - Returns the ticket subject (user's message).
  • {channel} - Mentions the new ticket channel.

Example

$nomention
$newTicket[Tickets;No subject was provided.;Thanks for making a ticket. Please explain your issue in detail so we can help.
Subject: {subject}
User: <@$authorID>;Created ticket! {channel};Failed to make ticket!]

example1

example1

$nickname

Returns a user's display name. >πŸ§™β€β™‚οΈ 'display name' means the user's server nickname, but if the user doesn't have a nickname then their username is returned instead.

Usages

There are two usages of the $nickname function.

Usage #1

$nickname

Returns the author's display name.

Usage #2

$nickname[userID]

Returns the provided user's display name.

Example

$nomention
<@$mentioned[1;yes]>'s nickname is `$nickname[$mentioned[1;yes]]`

example

$nomention

Disables the default author mention.

Usage

$nomention

Example

With $nomention:

example

Without $nomention:

example

$noMentionMessage

Returns the user's message without any mentions.

Usages

There are 2 usages of the $noMentionMessage function.

Usage #1

$noMentionMessage

Returns the user's full message (without mentions).

Usage #2

$noMentionMessage[argumentNumber]

Returns the argument matching the provided number (excluding mentions).

πŸ§™β€β™‚οΈ For example, $noMentionMessage[1] would just return the first word of the message. You can also use $noMentionessage[>] to get the last argument/word of the user's message.

Example

$nomention
$noMentionMessage

example

$numberSeparator

Separates the thousands in a number.

Usage

$numberSeparator[number;(optional) customSeparator]

Breakdown

  • number - The number to apply the separator to.
  • customSeparator - The separator between each thousand. Default is ,. Optional.

Example

$nomention
$numberSeparator[5000]

image

$onlyAdmin

Makes the command only for users with the administrator permission.

Usage

$onlyAdmin[errorMessage]

Breakdown

  • errorMessage - The error message that is returned when the user doesn't have administrator.

$onlyBotChannelPerms

The command can only be executed if the bot has all of the provided permissions in a channel.

Usage

$onlyBotChannelPerms[channelID;permissions;...;errorMessage]

Breakdown

  • channelID - The channel to check the permissions for. Use $channelID for the current channel.
  • permissions - The permissions that the bot needs to execute the command. Separate permissions with ;.
  • errorMessage - The message that is returned when the bot doesn't have the needed permissions.

Example

$nomention
$onlyBotChannelPerms[$channelID;sendmessages;embedlinks;Missing permissions!]
$description[Hey! I have `embed links` permission in current channel.]

$onlyBotPerms

The command can be executed if bot has all of the provided permissions.

Usage

$onlyBotPerms[permissions;...;errorMessage]

Breakdown

  • permissions - The permissions that the bot needs to run the command. Use ; as separator for multiple permissions.
  • errorMessage - The message to return when the bot doesn't have all the provided permissions.

Example

$nomention
$onlyBotPerms[sendmessages;embedlinks;Missing permissions!]
$description[Hey! I have `embed links` permission.]

$onlyForCategories

The command can only be executed in provided categories.

Usage

$onlyForCategories[category IDs;error message]

Breakdown

  • category IDs - The categories where the command can be executed in. Separate the categories using ;.
  • error message - The message that is returned when the command is executed in non-whitelisted categories.

$onlyForChannels

The command can only be executed in the provided channels.

Usage

$onlyForChannels[channelIDs;errorMessage]

Breakdown

  • channelIDs - The channels that the command can be executed in. Separate the IDs using ;.
  • errorMessage - The message that is returned when the command is used in a non-whitelisted channel.

$onlyForIDs

The command can only be executed by the provided users.

Usage

$onlyForIDs[userIDs;errorMessage]

Breakdown

  • userIDs - The users that can use this command, separate IDs using ;.
  • errorMessage - The error message that is returned, when the user running the command is not whitelisted.

Example

$onlyForIDs[YOUR_ID;❌ You are not my owner!]
$eval[$message]
$c[This can only be executed in BDScript 2.]

$onlyForRoles

The command can only executed by the provided roles.

Usage

$onlyForRoles[roleNames;errorMessage]

Breakdown

  • roleNames - The role names to allow.
  • errorMessage - The message to return when the user doesn't have the required roles.

$onlyForRoleIDs

The command can only executed by the provided roles.

Usage

$onlyForRoleIDs[roleID;...;errorMessage]

Breakdown

  • roleID - The role IDs which are allowed to use the command, separate IDs using ;.
  • errorMessage - The message to return when the user doesn't have the required roles.

$onlyForServers

The command can only be executed in the provided servers.

Usage

$onlyForServers[serverIDs;errorMessage]

Breakdown

  • serverIDs - The servers that the command can be executed in. Separate the IDs using ;.
  • errorMessage - The message that is returned when the command is used in a non-whitelisted server.

$onlyForUsers

The command can only be executed by users with certain 'usernames'.

Usage

$onlyForUsers[usernames;errorMessage]

Breakdown

  • usernames - The name's of the users that this command can be executed by. Separate the usernames using ;.
  • errorMessage - The message that is returned when the command is used by a non-whitelisted user.

$onlyIf

If x is related accordingly (based on the "sign") with y then the code runs. If not, the 'errorMessage' is returned.

Usage

$onlyIf[valuex(sign)valuey;errorMessage]

Signs

  • == - Equal
  • != - Not Equal
  • < - Less Than
  • >- Greater Than
  • >= - Greater Than Or Equal To
  • <= - Less Than Or Equal To

$onlyIfMessageContains

The command can only be executed if the 'text' contains all the 'indexes', otherwise the 'errorMessage' is returned.

Usage

$onlyIfMessageContains[text;indexes;errorMessage]

Breakdown

  • text - The text to check.
  • indexes - The phrases that the text must contain, separate phrases using ;.
  • errorMessage - The message that is returned if the text doesn't contain all the provided indexes.

$onlyNSFW

Only allows the command to be executed in NSFW channels.

Usage

$onlyNSFW[errorMessage]

Breakdown

  • errorMessage - The message that is returned when the command is executed outside of a NSFW channel.

Example

$nomention
$onlyNSFW[❌ That command can only be used in NSFW channels.]
$c[Put your code here.]

$onlyPerms

The command can only be executed if the user running the command has all the provided 'permissions'. Otherwise, the 'errorMessage' is returned.

Usage

$onlyPerms[permissions;errorMessage]

Breakdown

  • permissions - The required permissions (see permissions list). Separate permissions using ;.
  • errorMessage - The message that is returned when the user is missing the required permissions.

$or

Returns 'true' if at least one of the provided conditions is true, otherwise 'false' is returned.

Usage

$or[condition1;condition2;etc]

Example

$nomention
$if[$or[$message==hi;$message==hey;$message==hello]==true]
Hello $username!
$endif

example

$ping

Shows the delay between sent message and bot's response. The value of $ping is expressed in miliseconds.

Example command:

Ping: $ping ms

Expected output:

Ping: 50 ms

β €

$pinMessage

Pins a message in the current channel.

⚠️ A channel can have a maximum of 50 pinned messages.

Usages

There are 2 usages of $pinMessage :

Usage #1

$pinMessage

It pins bot's response message.

Example

$nomention
$pinMessage
This is a cool pinned message! 😎

example

Usage #2

$pinMessage[channelID;messageID]

It pins a specific message using it's message ID & channel ID.

Example
$nomention
$pinMessage[$channelID;$messageID]
I have pinned your message!

Screenshot_20220721_151403

$premiumExpireTime

Returns how long until premium expires.

πŸ§™β€β™‚οΈ Returns 'expired' if the bot is not premium.

Usage

$premiumExpireTime[(unix timestamp)]

Breakdown

  • unix timestamp - Accepts either "yes" or "no". If "yes" is written, it will return premium expiration value in UNIX timestamp and if "no", it will output as normal time format. Default as "no".

Example

When no premium

$nomention
My premium expires in: $premiumExpireTime

example

When premium

$nomention
My premium expires in: $premiumExpireTime (UNIX Timestamp : $premiumExpireTime[yes])

Screenshot_20220721_153646

$random

Returns random numbers.

Usages

There are two usages of the $random function.

Usage #1

$random

Returns a random number between 0 and 9.

Usage #2

$random[minimum;maximum]

Returns a random number between 'minimum' and 'maximum'.

Example

$nomention
🎲 You rolled `$random[1;7]`!

$random[] never returns the 'maximum' value, as it's right side exclusive range. Basically, to get a random number between 1 and 10; you'd put 11 as the 'maximum' instead of 10 i.e $random[1;11].

example

$randomChannelID

Returns a random channel ID from the current server.

Usage

$randomChannelID

Example

$nomention
Here's A Random Channel: <#$randomChannelID>

example

$randomMention

Mentions a random user from the server.

Usage

$randomMention

Example

$nomention
Random User: $randomMention

$randomString

Generates a random combination of letters/numbers.

Usage

$randomString[length]

Breakdown

  • length - How long the string should be (max 10).

Example

$nomention
String: `$randomString[$message]`

example

$randomText

Picks one value from the provided values randomly.

Usage

$randomText[text1;text2;etc]

Breakdown

  • text1/text2/etc - The text which the bot can choose from.

Example

$nomention
$randomText[Hello;Hi;Hey]!

example

$randomUser

Returns a random user's username.

Usage

$randomUser

$randomUserID

Returns a random user ID from the current server.

Usage

$randomUserID

$removeButtons

There are two usages of $removeButtons :

Usage #1

$removeButtons

It removes all buttons from the current message.

Usage #2

$removeButtons[message id]

It removes all buttons from a message using it's message id.

πŸ“ When providing "message id", make sure the message author is the bot.

$removeComponent

Removes certain component from a message.

Usage

$removeComponent[customID;(optional) messageID]

Breakdown

  • customID - The select-menu/button custom ID to remove from the message.
  • messageID - The message to remove the component from, uses the bot's current message if no 'messageID' is provided.

$removeContains

Deletes messages that contain the provided phrases.

Usage

$removeContains[phrases;howMany]

Breakdown

  • phrases - The phrases/words to delete, separate phrases using ;.
  • howMany - How many messages containing the provided phrases to delete. Max is 100.

Example

$nomention
$onlyPerms[managemessages;❌ You are missing the `MANAGE_MESSAGES` permission!]
$removeContains[https://discord.gg/;discord.gg/;https://discord.com/invite;$noMentionMessage]
Successful purged `$noMentionMessage` messages containing invites!

$removeLinks

Removes links from a value.

Usages

There are two usages of the $removeLinks function.

Usage #1

$removeLinks

Removes all links from the bot's reply.

Usage #2

$removeLinks[text]

Removes all links from the provided 'text'.

Example

$nomention
$removeLinks[$noMentionMessage]

example

$removeSplitTextElement

Removes a certain element from the $textSplit values.

πŸ§™β€β™‚οΈ This function is unneeded, if $textSplit isn't present in the code.

Usage

$removeSplitTextElement[index]

Breakdown

  • index - The index of the $textSplit value to remove.

See more in the Text Splitting guide...

$repeatMessage

Repeats the provided text a certain amount of times.

Usage

$repeatMessage[howMany;text]

Breakdown

  • howMany - How many times the text is repeated (max 10 times).
  • text - The text to repeat.

Examples

Example #1:

$nomention
$repeatMessage[5;Hello World]

example1

Example #2:

πŸ§™β€β™‚οΈ You can use a space at the end of 'text', so there are spaces in-between repeats.

$nomention
$repeatMessage[5;Hello World! ]

example2

$replaceText

Replaces 'sample' with 'new' from 'text', you can choose how many 'sample' is replaced by inputting 'howMany'.

Usage

$replaceText[text;sample;new;(optional) howMany]

Breakdown

  • text - The text where the bot is searching for the 'sample'.
  • sample - The text to replace with 'new'.
  • new - The text to replace 'sample' with.
  • how many - How many times the bot should replace the sample (if there is multiple arguments in 'text' that match 'sample'). Use -1 to replace all 'sample' in 'text' with 'new' (this last argument is optional).

Examples

Example #1:

  • Input: $replaceText[Hello World! Hello Earth!;Hello;Hi;1]
  • Output: Hi World! Hello Earth!

Example #2:

  • Input: $replaceText[Hello World! Hello Earth! Hello Dog!;Hello;Hi;-1]
  • Output: Hi World! Hi Earth! Hello Dog!

Example #3:

  • Input: $replaceText[Hello World! Hello Earth! Hello Dog!;Hello;Hi;-1] or $replaceText[Hello World! Hello Earth! Hello Dog!;Hello;Hi]
  • Output: Hi World! Hi Earth! Hi Dog!

$reply

Replies to the user's command

Usage

$reply

Example

$nomention
$reply
Hello $username πŸ‘‹πŸ»

Example

With $reply:

image

Without $reply:

image

$replyIn

The bot waits x (amount of time) before executing the code.

Usage

$replyIn[delay]

πŸ§™β€β™‚οΈ Maximum 'delay' can be 40 minutes (For premium users, it's 120 minutes) while minimum delay is 1 second.

Breakdown

  • delay - How long the command is delayed (e.g: 10s, 10m, 40m).

Example

$replyIn[5s]
Hi $username!

$resetServerVar

Resets a server variable back to it's default value (the one inputted in the app) for every server.

πŸ§™β€β™‚οΈ Use this function wisely!

Usage

$resetServerVar[variableName]

Breakdown

  • variableName - The name of the variable to reset.

$resetUserVar

Resets a user variable back to it's default value (the one inputted in the app) for every user, or just the provided user.

πŸ§™β€β™‚οΈ Use this function wisely!

Usage

$resetUserVar[variableName;(optional) userID]

Breakdown

  • variableName - The name of the variable to reset.
  • userID - The user to reset the variable for, if no user is provided, then the variable is reset for everyone!

$roleCount

Returns how many roles are in the current server.

Usage

$roleCount

Example

$nomention
There are $roleCount roles in $serverName[$guildID]

example

$roleExists

Returns whether or not the provided ID is a actual role.

πŸ§™β€β™‚οΈ 'true' means the role exists, 'false' means it doesn't.

Usage

$roleExists[roleID]

Breakdown

  • roleID - The "role" which the bot checks.

Examples

Example #1:

$roleExists[1239039039030939]
$c[This role doesn't exist!]

example1

Example #2:

$roleExists[858334189899087943]
$c[This role exists!]

example2

$roleGrant

Gives or removes roles from the provided user.

Usage

$roleGrant[user ID;+/-Role ID;...]

Breakdown

  • user ID - the user ID.
  • +/- - In front of RoleID use '+' to add the role or '-' to remove it.
  • RoleID - ID of the role to give or remove.

Example 1

$nomention
$roleGrant[3869969062509936;+9368562753613496]

Example 2

$nomention
$roleGrant[$mentioned[1];+$mentionedRoles[1]]
<@$mentioned[1]> user was given <@&$mentionedRoles[1]> role

image

$roleID

Returns a role's ID using its name.

Usage

$roleID[roleName]

Breakdown

  • roleName - The role name to get the role ID for.

Example

$nomention
Role ID For "$message": $roleID[$message]

example

$roleInfo

$roleInfo allows you to make a 'role info' command without using a bunch of different functions at once. This function returns info about the mentioned role.

Commands

You can use the 'commands' below within $roleInfo:

  • {name} - Returns the role name.
  • {ID} - Returns the role's ID.
  • {mentionable} - Returns if the role is mentionable by everyone.
  • {hoist} - Returns if a role is hoisted (displayed separately).
  • {color} - Returns the role's color.
  • {position} - Returns the roles position on 'roles list'.

Usage

$roleInfo[code/text]

⚠️ You can not include $roleInfo[] in a command with a $description[] (because it makes one automatically).

Example

$nomention
$roleInfo[Name: {name}
ID: {ID}
Mentionable?: {mentionable}
Hoisted?: {hoist}
Color: {color}
Position: {position}]
$title[Role Info]

example

$roleName

Returns a role's name.

Usage

$roleName[roleID]

Breakdown

  • roleID - The role to get the name of.

Example

$nomention
$roleName[$highestRole[$authorID]]

example

$roleNames

Returns the name of every role in the current server.

Usage

$roleNames

Example

$nomention
$description[Server Roles: $roleNames]

exampel

$rolePosition

Returns a roles position (1 being highest role).

Usage

$rolePosition[roleID]

Breakdown

  • roleID - The role to get the position of.

Example

$nomention
$description[<@&$findRole[$message]>'s Position: $rolePosition[$findRole[$message]]]

example

$round

Rounds up the provided number.

Usage

$round[number;(decimalPlace)]

Breakdown

  • number - The number to round.
  • decimalPlace - The decimal place to round the number to. Default as 0. Optional.

Example

$nomention
$round[100.123;1]

example

$scriptLanguage

Returns the name of scripting language used by the command.

Usage

$scriptLanguage

Example

$nomention
This command uses `$scriptLanguage`.

Note: After each execution of the command, we changed the script to another one.

Output value

  • BDScript
  • BDScript 2
  • BDScript Unstable

$second

Returns the current second of this minute.

πŸ§™β€β™‚οΈ You can use $time to change the timezone.

Usage

$second

Example

$nomention
Current Second: $second

example

$sendEmbedMessage

Sends embed message to provided channel. Not needed fields can be left empty.

Usage

$sendEmbedMessage[channel ID;content;title;title URL;description;color;author;author icon;footer;footer icon;thumbnail;image;add timestamp;return ID]

Breakdown

  • channel ID - id of the channel where the message will be sent.
  • content - text to be sent before embed.
  • title - text that will be used as the title in the embed.
  • title URL - url that will be applied to the title.
  • description - description that will be applied to the embed.
  • color - the color hex to set the embed border color as.
  • author icon - the image that appears in the author icon. This must be a valid image URL.
  • footer - The text to set the footer as.
  • footer icon - the URL to set the footer icon as. Must be a valid image URL.
  • thumbnail - the image to set as the thumbnail.
  • image - the URL of the image that appears. Must be a valid image URL.
  • add timestamp - add the time to send (use yes or no).
  • return ID - output the message ID outside the embed (use yes or no).

Example

$nomention
$sendEmbedMessage[$channelID;;Title;https://discord.gg/;description;000000;author;$authorAvatar;footer;$authorAvatar;$authorAvatar;$authorAvatar;no;no]

image

$sendMessage

Sends a new message.

Usage

$sendMessage[text;(optional) returnMessageID (yes/no)]

Breakdown

  • text - The text to send in the new message.
  • returnMessageID - Whether to return the ID of the newly created message, in another message. Optional, default is no.

Examples

Example #1:

$nomention
$sendMessage[This is message #1!]
$sendMessage[This is message #2!]
$sendMessage[This is message #3!]

example1

Example #2:

$nomention
$sendMessage[This is message #1!;yes]
$sendMessage[This is message #2!;yes]

example2

$serverChannelExists

Checks if the channel exists in the guild

Usage

$serverChannelExists[channel ID]

Breakdown

  • true - If could find the channel.
  • false - If couldn't find the channel

Example 1

$nomention
$serverChannelExists[566370477967147018]

Example 2

$nomention
$serverChannelExists[$channelID[channelName]]

$serverCooldown

Sets a server cooldown. After the command is used, no one in the server will be able to run the command until the 'duration' is up.

Usage

$serverCooldown[duration;errorMessage]

Breakdown

  • duration - The duration of this cooldown.
  • errorMessage - The error to return when the cooldown is still ongoing.

πŸ§™β€β™‚οΈ You can use %time% to get how much time is left on the cooldown, in 'errorMessage'.

$serverCount

Returns how many servers the bot is in.

Usage

$serverCount

Example

$nomention
I'm currently in $serverCount servers!

example

$serverIcon

Returns the server's icon.

Usages

There are two usages of the $serverIcon function.

Usage #1

$serverIcon

Returns the icon of the server that this command was ran in.

Usage #2

$serverIcon[serverID]

Returns the icon of the server provided.

Breakdown

  • serverID - The server to get the icon for (bot must be in the server).

Example

$nomention
$image[$serverIcon]

example

$serverInfo

Allows you to make a 'server info' command without using a bunch of different functions at once. This function returns info about the current server.

Usage

$serverInfo[text/code;(optional) showIcon (yes/no)]

Breakdown

  • text/code - The text that is returned.
  • showIcon - Whether or not to show the server icon as the thumbnail. Default is yes.

⚠️ You can not include $serverInfo[] in a command with a $description[] (because it makes one automatically).

Subset-Functions

You can use the 'subset-functions' below within $serverInfo:

  • {name} - Returns the server name
  • {region} - Returns the server region
  • {emoji} - Returns the server's emojis in a list.
  • {owner} - Returns the owner's username.
  • {ID} - Gets the guild ID.
  • {verificationLvl} - Returns the server verification level.
  • {large} - Finds out if a server is considered 'large'.

Example

$nomention
$title[Server Info]
$serverInfo[Server Name: {name}
Region: {region}
Owner: {owner}
Server ID: {ID}
Verify Level: {verificationLvl}
Emojis: {emoji}
Large Server?: {large};no]

example

$serverLeaderboard

Makes a server leaderboard (top-10).

Usage

$serverLeaderboard[variableName;sortType (asc/desc)]

Breakdown

  • variableName - The variable to create the leaderboard for.
  • sortType - Whether to sort the leaderboard in ascending (asc) or descending (desc) order.

πŸ§™β€β™‚οΈ $serverLeadboard automatically generates a description. So, $description should not be used in the code.

$serverName

Returns the server's name.

Usage

$serverName[guildID]

Breakdown

  • guildID - The server to get the name of. Use $guildID for the current server.

πŸ§™β€β™‚οΈ The bot must be present in the server to return it's name.

Example

$nomention
Server Name: $serverName[$guildID]

example

$serverNames

Returns server names that the bot is in.

Usages

There are 2 usages of $serverNames :

Usage #1

$serverNames

Returns 10 servers names that the bot is in

Example

$nomention
$onlyForIDs[YOUR_ID;Only my owner can use that!]
$serverNames

πŸ§™β€β™‚οΈ Replace 'YOUR_ID' with your user ID.

Usage #2

$serverNames[amount;separator]

Returns x server names that the bot is in.

Breakdown

  • amount - The x amount of server names you want. Use -1 if you want to return all server names.
  • separator - A custom separator for separating server names.

Example

$nomention
$serverNames[5;
]

$serverOwner

Returns the ID of the server owner.

Usages

There are two usages of the $serverOwner function.

Usage #1

$serverOwner

Returns the current server's owner.

Usage #2

$serverOwner[serverID]

Returns the owner ID of the provided server.

Breakdown

  • serverID - The server to get the owner ID for.

πŸ§™β€β™‚οΈ Bot must be present in the server to get the server owner ID.

Example

$nomention
This server is owned by <@$serverOwner>!

example

$serverRegion

(deprecated)

Returns the server's region.

πŸ§™β€β™‚οΈ This function is deprecated, because Discord removed the server region setting. For more information, click here.

Usage

$serverRegion

$serverVerificationLvl

The server's verification level. Returns None, Low, Medium, High, or Very High.

Usage

$serverVerificationLvl

Example

$nomention
This server's verification level is $serverVerificationLvl

example

$setServerVar

Updates a variable value for a server.

Usage

$setServerVar[variableName;newValue;(optional) serverID]

Breakdown

  • variableName - The variable to update.
  • newValue - The newly assigned variable value.
  • serverID - The server to assign the new value to, uses current server if no 'serverID' is provided.

πŸ“ Server variables values has a max character limit of 499 (for premium users, it's 4999).

See more in the Variables guide...

$setUserVar

Updates a variable's value for a user.

Usage

$setUserVar[variableName;newValue;(userID;guildID)]

Breakdown

  • variableName - The variable to update.
  • newValue - The newly assigned variable value.
  • userID - The user to assign the new value to, uses the author if no 'userID' is provided.
  • guildID - The guild to assign the new value to, uses current guild if no 'guildID' is provided.

πŸ“ User variables value has a max character limit of 4999.

See more in the Variables guide...

$setVar

Sets a variable's value globally, or for a user globally.

Usage

$setVar[variableName;newValue;(optional) userID]

Breakdown

  • variableName - The variable to update.
  • newValue - The newly assigned variable value.
  • userID - The user to globally assign the new value to. Sets the variable type as global-user, if 'userID' is present.

πŸ“ Global variables has a max character limit of 499 (for premium users, it's 4999).

See more in the Variables guide...

$shardID

Returns the id of the currently used shard.

Usages

There are two usages of the $shardID function.

Usage #1

$shardID - Returns the shard id of the current guild.

Usage #2

$shardID[guildID] - Returns the shard id of the provided guild.

Example

$nomention
$shardID

Screenshot_20220407_134320

$slashCommandsCount

Returns the number of slash commands the bot has enabled.

Usage

$slashCommandsCount

Example

$nomention
I have $slashCommandsCount slash commands!

example

$slowmode

With slowmode enabled in a channel, it'll limit the number of messages a user is able to send in a channel based on a timed cooldown. $slowmode[] is used to change a channel's slowmode using a bot.

πŸ§™β€β™‚οΈ Slowmode delay can't be set over 6 hours/21600 seconds. Also, in order for the bot to run $slowmode[] successfully, it needs the 'Manage Channels' permission.

Usage

$slowmode[channelID;delay]

Breakdown

  • channelID - The channel in the which the slowmode is being modified in. Use 0/0s to disable the slowmode.
  • delay - The new slowmode delay (in seconds, e.g. 1s, 180s, 5s, 3s, etc).

Example

$nomention
$argsCheck[>1;:x: Incorrect Usage! Example: `!slowmode 5s`]
$slowmode[$mentionedChannels[1;yes];$message[1]]
Slowmode changed to $message[1]!

example

$sort

Sorts provided numbers. Amount of numbers can be set to -1 if you'd like to return every number

Usage

$sort[numbers;...;direction;return amount;separator]

Breakdown

  • numbers - sets numbers separated by ; (ex: 1;2;3)
  • direction - what order will be used (ascending or descending).
    • asc - ascending
    • desc - descending
  • return amount - how many numbers will be returned.
    • -1 - Use -1 to generate all numbers
  • separator - the separator between each number.

Example

$nomention
$sort[8;5;9;1;3;asc;4; - ]

image

$splitText

Retrieves a value from $textSplit.

⚠️ This function is used with $textSplit.

Usage

$splitText[index]

Breakdown

  • index - The split value to get (e.g 2 for the second split). You can also use > to return the last splitted value i.e $splitText[>].

Example

$nomention
$textSplit[Hi-Hello-Hey;-]
$splitText[2]

The above example will return output as Hello.

See more in the Text Splitting guide...

$startThread

Creates a new thread.

Usage

$startThread[name;channelID;messageID (canBeLeftEmpty);archiveDuration (60/1440/4320/10080);returnThreadID (yes/no)]

Breakdown

  • name - The name of the newly created thread.
  • channelID - The channel that is the parent of this thread.
  • messageID - The message that this thread is created for, can be left empty.
  • archiveDuration - The archive duration of this thread in minutes. Only 60, 1440,4320, 10080 can be used. Note that for the 4320 archive duration option, the server needs to be level 1 boosted, and for 10080 the server needs level 2.
  • returnThreadID - Whether to return the thread channel ID or not.

Example

$var[threadID;$startThread[Cool Thread;$channelID;;1440;yes]]
I created a new thread! <#$var[threadID]>
$c[❗️This example requires BDScript 2 enabled❗️]

example

Explaination:
This code is storing the newly created thread ID returned from $startThread[] (using $var[]). Then, in the rest of the code $var[threadID] was called to get the thread ID; which allowed the bot to mention the new thread channel.

$sub

Returns the subtraction of the provided numbers.

Usage

$sub[numbers]

Breakdown

  • numbers - The numbers to subtract, separate numbers using ;.

Example

$nomention
$sub[10;5]

example

$sum

Returns the addition of the provided numbers.

Usage

$sum[numbers]

Breakdown

  • numbers - The numbers to add together, separate numbers using ;.

Example

$nomention
$sum[10;5]

example

$suppressErrors

Suppresses error messages.

Usages

There are two usages of $suppressErrors.

Usage #1

$suppressErrors

Prevents error messages from being returned as the response.

Simply put, the bot will not respond if there is a error message.

Usage #2

$suppressErrors[customError]

Prevents error messages from being returned as the response. Instead, the 'customError' text is returned.

$takeRole

(deprecated)

πŸ§™β€β™‚οΈ This command is deprecated instead better use $roleGrant.

Removes a role to the provided user.

Usages

There are two usages of the $takeRole function.

Usage #1

$takeRole[userID;roleID]

Removes a role for the provided user.

Breakdown

  • userID - The user to remove the role for.
  • roleID - The role to remove from the user.

Usage #2

$takeRole[roleID]

Removes the provided role from the mentioned user.

Breakdown

  • roleID - The role to remove from the mentioned user.

Example

$nomention
$onlyPerms[manageroles;Missing permissions!]
$takeRole[867492530463178803]
Removed $roleName[867492530463178803] from $username[$mentioned[1]]!

example

$textSplit

Separates 'text' by the 'splitter', and saves data for $splitText.

Usage

$textSplit[text;splitter]

Breakdown

  • text - The text to split.
  • splitter - The splitter to split arguments with.

See more in the Text Splitting guide...

$threadAddMember

Adds a member to a thread.

Usage

$threadAddMember[threadID;userID]

Breakdown

  • threadID - The ID of the thread channel to add this user to.
  • userID - The user to add to the thread.

Example

$nomention
$var[thread;$startThread[Cool Thread;$channelID;;60;yes]]
$threadAddMember[$var[thread];$authorID]
$c[Adds the author to the newly created 'Cool Thread']

example1

example2

$threadRemoveMember

Removes a member from a thread.

Usage

$threadRemoveMember[threadID;userID]

Breakdown

  • threadID - The ID of the thread channel to remove this user from.
  • userID - The user to remove from the thread.

Example

$nomention
$threadRemoveMember[878305123707785218;$authorID]

example

$thumbnail

Adds a thumbnail to the embed.

Usage

$thumbnail[image url;(index)]

Breakdown

  • image url - The image to set as the thumbnail.
  • index - What embed the thumbnail should belong to (Optional). Default is 1. (learn more)

Example

$nomention
$description[This is the thumbnail β†˜οΈ]
$thumbnail[$authorAvatar]

example

$time

Changes the timezone for date/time functions.

Usage

$time[timezone]

Breakdown

  • timezone - The timezone to change the time/date functions to.

⚠️ Get timezones from here (click-me)

Example

$nomention
$time[America/New_York]
Date: $date

Example

$timeout

Timeouts the mentioned users, or the user provided in 'User ID', for a certain 'Duration' (max 28 days)

Note: To untimeout users see $untimeout[]

Usage

$timeout[duration;(userID)]

Examples

Example 1

$nomention
$timeout[$message[1]]

Example 2

$nomention
$timeout[$message[1];$findUser[$message[2];no]]

$title

Sets the embed title.

Usage

$title[text;(index)]

Breakdown

  • text - The text to set the title as. It cannot exceed more than 256 characters.
  • index - What embed the title should belong to (Optional). Default is 1. (learn more)

Example

$nomention
$title[This is a title!]
$description[⬆️ That is a nice title.]

example

$toLowercase

Converts the provided text to all lowercase.

Usage

$toLowercase[text]

Breakdown

  • text - The text to convert.

Example

$nomention
$toLowercase[THIS TEXT IS NOW lowercase]

example

$toTitleCase

Changes first letter of the word to uppercase in provided text.

Usage

$toTitleCase[text]

Breakdown

  • text - The text which needs to be changed.

$toUppercase

Converts the provided text to all uppercase.

Usage

$toUppercase[text]

Breakdown

  • text - The text to convert.

Example

$nomention
$toUppercase[this text is now UPPERCASE]

example

$trimSpace

Removes space from the start and end of the provided text

Usage

$trimSpace[text]

Example

$nomention
>$trimSpace[ Hi ]<

image

$tts

Marks the bot's message as TTS (text-to-speech).

What is TTS? (click-me)

Usage

$tts

$unban

Unbans a user using their username (from the user's message).

Usage

$unban

Example

$nomention
$unban
Successfully unbanned user!

example

example2

$unbanID

Unbans a user using their ID.

πŸ§™β€β™‚οΈ The bot needs ban permissions to unban users!

Usages

There are two usages of the $unbanID function.

Usage #1

$unbanID

Unbans user by using their ID. The ID is taken from the last argument of the user's message.

Usage #2

$unbanID[userID]

Unbans user by using the ID provided in the 'userID' field.

Breakdown

  • userID - The user to unban.

Example

$nomention
$unbanID
Successfully unbanned user!

example

$unescape

Unescapes special characters from a text. This can be used so the script reads special characters from texts such as messages, names, etc as a part of a function.

Usage

$unescape[text]

Breakdown

  • text - The text to unescape.

Example

$nomention
$randomText[$unescape[$message]]

example

$unmute

(deprecated)

πŸ§™β€β™‚οΈ This command is deprecated instead better use $untimeout.

Unmutes the mentioned user.

Usage

$unmute[mutedRoleName]

Breakdown

  • mutedRoleName - The name of the 'Muted' role (case sensitive).

Example

$nomention
$onlyPerms[manageroles;❌ You are missing permission: `MANAGE_ROLES`.]
$unmute[Muted]
βœ… Successfully unmuted $username[$mentioned[1]]#$discriminator[$mentioned[1]]!

example

$unpinMessage

Unpins the message.

Usage

$unpinMessage[channel ID;message ID]

$untimeout

Removes timeout from mentioned users, or the provided user.

Note: To timeout users see $timeout[]

Usage

$untimeout[(user ID)]

Examples

Example 1

$nomention
$untimeout[]

Example 2

$nomention
$untimeout[$findUser[$message[1];no]]

$uptime

Returns how long the bot has been online.

Usage

$uptime

Example

$nomention
I've been online for `$uptime`!

ex

$url

Encodes or decodes url

Usage

$url[mode;text]

Signs

  • encode - encode text.
  • decode - decode text.

Example

$nomention
$url[encode;@Wiki Bot]

image

$useChannel

The bot's response gets sent to the provided channel.

Usage

$useChannel[channelID]

Breakdown

  • channelID - The channel to redirect the bot's response to.

Example

$nomention
$useChannel[$mentionedChannels[1]]
$description[hi]
$title[hello]

ex1

ex2

$userAvatar

Returns the provided user's avatar URL.

Usage

$userAvatar[userID]

Breakdown

  • userID - The user to return the avatar for.

Example

$nomention
$image[$userAvatar[$mentioned[1;yes]]]

example

πŸ§™β€β™‚οΈ You can use ?size=size at the end of the URL to increase the size of the image. Example sizes: 1024, 2048, 4096.

$nomention
$image[$userAvatar[$mentioned[1;yes]]?size=4096]

example2

$userExists

Returns whether the provided user actually exists.

πŸ§™β€β™‚οΈ 'true' means the user exists, 'false' means they don't.

Usage

$userExists[userID]

Breakdown

  • userID - The ID of the hypothetical user.

Example

$nomention
$userExists[$mentioned[1]]

example

$userID

Gets the user's ID using their username or tag.

Usage

$userID[username/tag]

Breakdown

username/tag - The user's username (User) or tag (User#0000) to return the ID for.

Example

$userID[Spen]

example

$userInfo

Allows you to make a 'user info' command without using a bunch of different functions at once. Returns info about the mentioned user.

Usage

$userInfo[text/code]

⚠️ You can not include $userInfo[] in a command with a $description[] (because it makes one automatically).

Subset Functions

You can use the 'subset-functions' below within $userInfo:

  • {username} - Returns the user's username.
  • {ID} - Gets the users ID.
  • {BOT} - Checks if the user is a bot.
  • {discriminator} - Gets the user's discriminator.

Example

$nomention
$userInfo[Username: {username}
User ID: {ID}
Bot?: {BOT}
Discriminator: {discriminator}]
$title[User Info]

example

$userJoined

Returns date when given user joined the server. You can also give your own date format.

Usage

$userJoined[userID;(optional) format]

Example

$nomention
$userJoined[$authorID]

example

Format

The format allows you to customize the date format.

  • Monday - Day
  • January - Month
  • 3:04 Time
  • 2006 - Year
  • 2 - Day Of The Month

$userJoined[$authorID;January 2 (Monday), 2006 at 3:04] would return Month DayOfTheMonth (Day), Year at Time.

$userJoinedDiscord

Returns the date when given user created their Discord account. You can also give your own date format.

Usage

$userJoinedDiscord[userID;(optional) format]

Example

$nomention
$userJoinedDiscord[$authorID]

example

Format

The 'format' option allows you to customize the date format.

  • Monday - Day
  • January - Month
  • 3:04 - Time
  • 2006 - Year
  • 2 - Day Of The Month

$userJoinedDiscord[$authorID;January 2 (Monday), 2006 at 3:04] would return Month DayOfTheMonth (Day), Year at Time.

$userLeaderboard

Returns the top ten user's username and value for the given user variable.

Usage

$userLeaderboard[variableName;sortType (asc/desc)]

Breakdown

  • variableName - The variable to create the leaderboard for.
  • sortType - Whether to sort the leaderboard in ascending (asc) or descending (desc) order.

πŸ§™β€β™‚οΈ $userLeaderbard automatically generates a description. So, $description should not be used in the code.

Example

$nomention
$userLeaderboard[Money;asc]

$username

Returns a user's username.

Usages

There are two usages of the $username function.

Usage #1

$username - Returns the username of the user running this command.

Usage #2

$username[userID] - Returns username of the user with the 'userID' that is provided.

Examples

Example #1

(for this example a echo command)

$nomention
Hello $username!

example1

Example #2

(for this example a hug command)

$nomention
$username just hugged $username[$mentioned[1]]!

example2

$userPerms

Returns user permissions. Amount to return can be set to -1 if you'd like to return every permission

Usage

$userPerms[user ID;return amount;separator]

Breakdown

  • user id - the userID to get their permissions.
  • return amount - how many permissions you want to get, use -1 to extract all.
  • separator - text/character to use to separate each permission

Example

$nomention
$userPerms[$mentioned[1];-1;-]

image

$userReacted

Checks if the user reacted to a message, with the provided 'emoji'.

πŸ§™β€β™‚οΈ 'true' means the user did react with the emoji, otherwise 'false' is returned.

Usage

$userReacted[channelID;messageID;userID;emoji]

Breakdown

  • channelID - The channel where the message is located.
  • messageID - The message to check the reactions for.
  • userID - The user that should of reacted.
  • emoji - The emoji that the user should of reacted with.

Example

$nomention
$userReacted[$channelID;9213992398838926;3894834783463753;πŸ§™β€β™‚οΈ]

example

$userRoles

Returns a user's roles.

Usage

$userRoles[userID]

Breakdown

  • userID - The user to return the roles for.

Example

$nomention
$description[<@$mentioned[1;yes]>'s roles: 
$userRoles[$mentioned[1;yes]]]

example

$userServerAvatar

Returns server avatar URL of given user ID.

Usage

$userServerAvatar[User ID]
  • user id - The user to get it's server avatar. If user doesn't have server avatar. Then, it returns default user avatar.

Example

$nomention
$image[$userServerAvatar[$authorID]?size=4096]

Screenshot_20220831_102334

$variablesCount

Returns how many of a certain variable type the bot has.

Usage

$variablesCount[variableType (user/server)]

Breakdown

  • variableType - The variable type to return the count for.

Example

$nomention
$variablesCount[server]

example

$varExistError

Returns a custom error if a certain variable doesn't exist.

Usage

$varExistError[variableName;errorMessage]

πŸ§™β€β™‚οΈ This function is useful when posting codes in the #wikis channel, so users don't forget to create the needed variables.

Breakdown

  • variableName - The variable that should exist.
  • errorMessage - The custom error message to return if the variable doesn't exist.

Example

$nomention
$varExistError[Cool;Add the 'Cool' variable in the app.]
$setUserVar[Cool;true;$authorID]
You are now cool!

example

$year

Returns the current year.

πŸ§™β€β™‚οΈ You can use $time to change the timezone.

Usage

$year

Example

$nomention
Current Year: $year

example

Premium

Bot Designer for Discord's premium points system allows you to support the developers financially and gain some sweet perks!

Purchasing Premium Points

  1. Open BDFD app and click on profile icon.

    InShot_20220809_185729644

  2. Then, click "Buy premium points".

    Screenshot_20220809_190558

  3. Choose your preferable package and confirm your purchase.

    Screenshot_20220809_114500

Redeeming Premium

After a successful purchase of premium points, here's how to redeem them :

  1. Select your bot in app homepage and click "Add premium time" button in dashboard tab.

    Screenshot_20220809_112223

  2. Select the amount of points you want to spend, then confirm.

    IMG_20220809_152453

    πŸ“ One premium point equals one week of premium hosting.

Premium Perks

Main

  • $getServerVar[] in triggers (custom prefixes).
  • Awaited reactions.
  • Access to $messageContains[] and $alwaysReply callbacks.
  • Custom images.
  • Access to $ignoreTriggerCase and $sendNotification functions.
  • Unlimited commands/variables.
  • Ad-free hosting time.
  • Priority bot hosting/startup.
  • Maximum 120 minutes duration in $replyIn & $editEmbedIn.
  • Increased server and global variable character limits.
  • Bot guild list.
  • Embed builder.
  • Sharding.

Discord Server Perks

  • The premium role. Run !getPremiumRole.
  • Access to the premium chat.
  • Additional role income in our server economy system.

Guides

Support

For any premium related issues/support, contact us at premium-support@mail.botdesignerdiscord.com.

You can also ask questions about premium in our Community Discord Server.

$alwaysReply

(for premium users)

Triggered whenever a user sends a message.

$alwaysReply is a callback, which means it's used in the command trigger (not the code). The command is ran when a user sends a message.
It's useful when creating leveling, auto-moderation, or message counting systems.

$messageContains

(for premium bots)

$messageContains[] is a callback that allows you to create a trigger with multiple phrases. In addition, the bot also looks for those phrases anywhere in the author's message. This feature is great for creating an auto-response or auto-moderation system.

Usage

$messageContains[word;...]

Breakdown

  • word - The phrases/words the bot checks for. Separate phrases using ;.

Example

  1. Create a new command with command trigger set as $messageContains[].

  2. Put text in the reply message/code.

    example

Now, let's say in chat someone typed : Hello Bot!, Hello, Hey Everyone!, Hi Noituri etc. The bot would respond with "Hello there! How are you?".

$ignoreTriggerCase

(for premium bots)

$ignoreTriggerCase is a function that makes the command trigger not case sensitive. For example, !help and !HeLp would both work.

Usage

$ignoreTriggerCase

Example

$nomention
$ignoreTriggerCase
Hello World!

$sendNotification

Sends notification to your mobile phone

Usage

$sendNotification[message;(image URL)]

Breakdown

  • message - The text that should be in the sent notification.
  • image URL - The URL for the image to be attached.

Example

$sendNotification[Hello, I miss you!;$userAvatar[$botID]]

example

Awaited reactions

(for premium bots)

Awaited reactions are similar to awaited commands. Unlike awaited commands which wait for a message, they wait for a reaction instead.

end result

πŸ“ Reaction roles are not possible at the moment since awaited reactions can only be triggered by the author and they expire whenever the bot goes offline.

Getting Started

To create an awaited reaction command, following functions and callback are used :

$awaitReactions[]

This function is used to await an reaction command.

Usage

$awaitReactions[<Command name;Reaction>;...]
  • command name - It's the name which will be used inside $reaction[] callback.
  • reaction - It awaits the given emoji. Emoji must be either in Unicode or in discord emoji id format.

πŸ“ You can group reactions by specifying more "command names" and "reactions" in $awaitReactions[].

⚠️ In group reactions, when one reaction is used, the others stop working i.e let's say, a command awaits two reactions (βœ”οΈ & ❌). If the user reacts βœ”οΈ then ❌ stops working.

$reaction[]

$reaction[] is a callback. It gets triggered whenever an awaited reaction occurs.

Usage

$reaction[name]
  • name - It is the value which is used in "command name" argument of $awaitReactions[].

$usedEmoji

This function is used to return the emoji which was triggered in $reaction[] command.

Usage

$usedEmoji

Example

Screenshot_20220809_194823 Screenshot_20220809_194754 Screenshot_20220809_194805 Screenshot_20220809_194642

Custom Images

(for premium bots)

Upload custom images in the app from your device, without any image links. You can use the custom image as an embed image using $customImage[].

Uploading

  1. Select your bot and click "Image functions" in dashboard tab.

    Screenshot_20220809-223716-01

  2. Click the "Add image" button.

    example3

  3. Provide an image name and tag. The tag is used in $customImage[] to get the image. The name can be anything.

    Screenshot_20220809-223744

  4. Upload your image by clicking "Selected Image" and save the changes.

Retrieving

$customImage[]

This function is used to return the uploaded image in the app.

Usage

$customImage[Custom image tag]

Breakdown

  • custom image tag - The tag that you set the custom image to, previously.

Example

$nomention
$customImage[NiceImage]

ex

Custom Prefixes

(for premium bots)

Explanation

Premium gives you access to use $getServerVar[] in triggers. This makes it possible to make custom prefixes.

What Are Custom Prefixes?

Custom prefixes allow the bot's prefix (like !) to be changed in different servers. For example, in one server the bot's prefix could be ! and in the other it could be ?.

How-To

  1. Create a variable called "prefix" with the value set to the bot's default prefix. The default prefix is the prefix the bot uses if no custom one is set.

    image

  2. Create a command for setting the prefix, use the code below.

    $nomention
    $onlyAdmin[❌ You need the administrator permission to use that!]
    $setServerVar[prefix;$noMentionMessage]
    Set $serverName[$guildID]'s prefix to `$noMentionMessage`
    

    image

  3. Change all the command triggers to $getServerVar[prefix]trigger-here. For example, !ping would become $getServerVar[prefix]ping.

  4. You're all set, enjoy!

    image

Embed Builder

(for premium users)

Embed Builder is a feature which allows creating embed easily and fast with live embed and code preview support.

Using Embed Builder

  • Select your bot in BDFD app homepage.

  • In Dashboard tab, click "Embed Builder".

    Screenshot_20220828_201116

  • Fill out the necessary fields as per your choice.

    Screenshot_20220828_202359

  • Once done, copy the generated code from "Code preview" and paste in your respective command code.

JavaScript

(for advanced users)

Index

Notes

  • Bot Designer for Discord allows you to use JavaScript (ES2015).
  • Discord API is not fully supported yet.
  • Callbacks aren't supported in JavaScript at the moment.

Accessing JavaScript

  1. Click on settings icon βš™οΈ in the app homepage and toggle on "Enable features for advanced users".

    jswiki1

    jswiki2

  2. Create a new command and set the Scripting Language to "JavaScript".

    jswiki3

    jswiki4

Available Objects in Commands

NameTypeDescription
messagestringContains author's message.
commandPrefixstringContains the trigger of this command.
authorIdstringContains the ID of the user that executed this command.
channelIdstringContains channel ID where the command was used.
userMentionsarray of string valuesContains user mentions.
roleMentionsarray of string valuesContains role mentions.

Supported API Functions

NameDescription
setResponse(replyText)Where replyText is a string value. Sends a message to the channel where the command was used.
setEmbedResponse(title, description, footer)Where title, description, footer are string values. Sends a embedded message to the channel where the command was used.
setEmbedImage(imageURL)Where imageURL is a string value. Sets image of the embedded message.
ban(userID)Where userID is a string value. Bans a user.
banWithReason(userID, reason)Where userID and reason are string values. Bans a user with reason.
unban(userID)Where userID is a string value. Unbans the user.
kick(userID)Where userID is a string value. Kicks a user.
kickWithReason(userID, reason)Where userID and reason are string values. Kicks a user with reason.
giveRole(userID, roleID)Where userID and roleID are string values. Gives a role to the user.
takeRole(userID, roleID)Where userID and roleID are string values. Removes a role from the user.
channelTyping()Shows "Bot is typing..." message.
createChannel(name, type)Where name and type are string values (type must be text or voice). Creates a channel. Providing wrong type will result in throwing an exception which you can catch.
removeChannel(channelID)Where channelID is a string value. Deletes a channel.
pinMessage(channelID, messageID)Where channelID and messageID are string values. Pins a message.
unpinMessage(channelID, messageID)Where channelID and messageID are string values. Unpins a pinned message.
sendChannelMessage(channelID, message)Where channelID and message are string values. Sends message to the provided channel.

Example

(say command)

var text = message.replace(commandPrefix, " ") // Makes 'text' the user's message without the command trigger.
setResponse(text) // Sets the response as 'text'.

image

Callbacks

Callbacks in BDFD are functions for triggers which are executed when a certain action is performed. These actions include banning, unbanning, user joining, user leaving, and more.

Callbacks are not used in the command code, they are used in the command trigger. This section will explain the various callbacks you can use.

$onJoined

When a user joins the server, the command is triggered.

$onJoined[channelID] is a callback, which means it's used in the command trigger (not the code). The command is ran when a user joins the server. You must replace 'channelID' with a valid channel ID.

Example

  1. Make the command trigger $onJoined[channelID].
    example1

  2. Input your code/reply text.

    πŸ§™β€β™‚οΈ You can use functions like $username, $authorAvatar, $authorID, $membersCount, $serverName[$guildID] here.

    example2

  3. Now, you have a welcome message! ✨
    example3

Not Working? Check out the Troubleshooting section.

Troubleshooting

Is $onJoined[] bugged or not working?

  • You must have at least version 1.17.9 of the app.

  • Go to Discord Developer Portal and select your bot. Then, click on bot's tab and enable Member Intents.
    image
    image

  • Open BDFD app and select your bot. Go to bot settings and enable Member Intents.
    Screenshot_20220808_042857
    Screenshot_20220808_043030

    πŸ“ Enabled intents in the app should reflect the intents enabled in the Discord Developer Portal.
    For example: If you have Members Intent enabled in the Discord Developer Portal then you should respectively enable them in the app (unless you don't want to use them at all).

  • Make sure $onJoined[channelID] is written in the 'command trigger' field and not in the code.
    image

  • Make sure your bot has VIEW_CHANNEL, EMBED_LINKS, SEND_MESSAGES permission in the channel provided in $onJoined[], and that you inputted a valid channel ID.

  • Also, make sure you don't have more than 1 $onJoined[].

Advanced

Per-Server $onJoined

Both free and premium users can use $onJoined[], and all users can put $getServerVar[] within $onJoined[]. However, non-premium users can not use $getServerVar[] outside of callbacks.
If you own a public bot and want to make it so multiple different servers can use $onJoined[] (e.g. set their own welcome channel), follow these steps:

  1. Make a variable named "welcome" and the value set to nothing.
    image

  2. Make a command for setting the welcome channel, then put the following in your code:

    $nomention
    $onlyAdmin[You need the admin permission to use that!]
    $argsCheck[>1;Please mention a channel!]
    Welcome channel updated!
    $setServerVar[welcome;$mentionedChannels[1]]
    

    πŸ“ Servers will need to setup the channel they want the welcome message to send to (by running a command with the code above).

  3. Now replace $onJoined[channelID] in your welcome command trigger, with $onJoined[$getServerVar[welcome]] and you're all set!

$onLeave

When a user leaves the server, the command is triggered.

$onLeave[channelID] is a callback, which means it's used in the command trigger (not the code). The command is ran when a user leaves the server. You must replace 'channelID' with a valid channel ID.

Example

  1. Make the command trigger $onLeave[channelID].

    example1

  2. Input your code/reply text.

    πŸ§™β€β™‚οΈ You can use functions like $username, $authorAvatar, $authorID, $membersCount, $serverName[$guildID] here.

    example2

  3. Now, you have a leave message! ✨
    example3

Not Working? Check out the Troubleshooting section.

Troubleshooting

Is $onLeave[] bugged or not working?

  • You must have at least version 1.17.9 of the app.

  • Go to Discord Developer Portal and select your bot. Then, click on bot's tab and enable Member Intents.
    image
    image

  • Open BDFD app and select your bot. Go to bot settings and enable Member Intents.
    Screenshot_20220808_042857
    Screenshot_20220808_043030

    πŸ“ Enabled intents in the app should reflect the intents enabled in the Discord Developer Portal.
    For example: If you have members intent enabled in the Discord Developer Portal then you should respectively enable them in the app (unless you don't want to use them at all).

  • Make sure $onLeave[channelID] is written in the 'command trigger' field and not in the code.
    image

  • Make sure your bot has VIEW_CHANNEL, EMBED_LINKS, SEND_MESSAGES permission in the channel provided in $onLeave[], and that you inputted a valid channel ID.

  • Also, make sure you don't have more than 1 $onLeave[].

Advanced

Per-Server $onLeave

Both free and premium users can use $onLeave[], and all users can put $getServerVar[] within $onLeave[]. However, non-premium users can not use $getServerVar[] outside of callbacks.
If you own a public bot and want to make it so multiple different servers can use $onLeave[] (e.g. set their own leave message channel), follow these steps:

  1. Make a variable named "leave" and the value set to nothing.
    image

  2. Make a command for setting the leave channel, then put the following in your code:

    $nomention
    $onlyAdmin[You need the admin permission to use that!]
    $argsCheck[>1;Please mention a channel!]
    Leave channel updated!
    $setServerVar[leave;$mentionedChannels[1]]
    

    πŸ“ Servers will need to setup the channel they want the leave message to send to (by running a command with the code above).

  3. Now replace $onLeave[channelID] in your leave command trigger, with $onLeave[$getServerVar[leave]] and you're all set!

$onBanAdd

Triggered when a user gets banned from the server.

$onBanAdd[channelID] is a callback, which means it's used in the command trigger (not the code). The command is ran when a user is banned from the server. You must replace 'channelID' with a valid channel ID or a server variable that holds the channelID ($getServerVar[]).

Example

#1: Make a command with $onBanAdd[channelID] as the trigger.

πŸ§™β€β™‚οΈ You must replace 'channelID' with a valid channel ID!

example1

#2: Input your code/reply text.
example2

#3: Now you have a ban message! ✨
example3

$onBanRemove

Triggered when a user gets unbanned from the server.

$onBanRemove[channelID] is a callback, which means it's used in the command trigger (not the code). The command is ran when a user is unbanned from the server. You must replace 'channelID' with a valid channel ID or a server variable that holds the channelID ($getServerVar[]).

Example

#1: Make a command with $onBanRemove[channelID] as the trigger.

πŸ§™β€β™‚οΈ You must replace 'channelID' with a valid channel ID!

example1

#2: Input your code/reply text.
example2

#3: Now you have a unban message! ✨
example3

$onMessageDelete

Triggered when a user deletes a message.

$onMessageDelete[channelID] is a callback, which means it's used in the command trigger (not the code). The command is ran when a user deletes a message. You must replace 'channelID' with a valid channel ID or a server variable that holds the channelID ($getServerVar[]).

Example

  1. Make a new command, with the trigger $onMessageDelete[channelID].

    πŸ§™β€β™‚οΈ Replace 'channelID' with a valid channel ID!

    example1

  2. Set the code/reply text.
    example2

  3. Now, the bot will send a message when someone deletes a message! ✨
    example3

$onInteraction

Triggered upon an interaction being emitted (e.g. a button being clicked).

Usages

  • $onInteraction - Command runs upon any interaction being emitted.

Note: $onInteraction (without brackets) shall only be used once. As it replies directly to the Discord's interaction event--once it processes the data, such data becomes invalid.

  • $onInteraction[customID] - Command runs upon the provided 'customID' being clicked/selected/interacted with.

Custom IDs

Components (e.g. buttons and select menus), must have a custom ID. This property is defined by the developer when using $addButton[], $newSelectMenu[], etc. For example, if you set customID to click_me on a button, in $onInteraction[] you'd put click_me: $onInteraction[click_me]. Alternatively, you can use $onInteraction (without brackets) with if statements and $customID:

$if[$customID==click_me]
Hello!
$c[Bot replies with "Hello" when the 'click_me' button is clicked by a user.]
$endif

πŸ§™πŸΌβ€β™‚οΈ Using $onInteraction (with brackets) can help save command space.

Custom IDs must be unique per component, multiple buttons on the same message must not share the same custom ID. Custom ID is a string of max 100 characters.

Custom IDs may also be referred to as interaction IDs.

Examples