diff --git a/.github/workflows/book_deploy.yml b/.github/workflows/book_deploy.yml index 9df0a224cba..808cae46af2 100644 --- a/.github/workflows/book_deploy.yml +++ b/.github/workflows/book_deploy.yml @@ -153,3 +153,4 @@ jobs: style: 5 label: Preview site url: https://wiki.botdesignerdiscord.com/nightly/${{ env.LINK }} + diff --git a/book.toml b/book.toml index 64b27bf0b39..59efa1d913d 100644 --- a/book.toml +++ b/book.toml @@ -78,17 +78,6 @@ assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install` "/bdscript/jsonStringify.html" = "../guides/general/jsonFunctions.html#jsonstringify" "/bdscript/jsonUnset.html" = "../guides/general/jsonFunctions.html#jsonunset" -"/bdscript/webhookAvatarURL.html" = "../guides/general/webhooks.html" -"/bdscript/webhookColor.html" = "../guides/general/webhooks.html" -"/bdscript/webhookContent.html" = "../guides/general/webhooks.html" -"/bdscript/webhookCreate.html" = "../guides/general/webhooks.html" -"/bdscript/webhookDelete.html" = "../guides/general/webhooks.html" -"/bdscript/webhookDescription.html" = "../guides/general/webhooks.html" -"/bdscript/webhookFooter.html" = "../guides/general/webhooks.html" -"/bdscript/webhookSend.html" = "../guides/general/webhooks.html" -"/bdscript/webhookTitle.html" = "../guides/general/webhooks.html" -"/bdscript/webhookUsername.html" = "../guides/general/webhooks.html" - "/bdscript/appendOptionSuggestion.html" = "../guides/general/interactions/slashCommands/autoComplete.html" "/bdscript/autoCompleteOptionName.html" = "../guides/general/interactions/slashCommands/autoComplete.html" "/bdscript/autoCompleteOptionValue.html" = "../guides/general/interactions/slashCommands/autoComplete.html" diff --git a/external/CHANGELOG.json b/external/CHANGELOG.json index 888e6d426a1..bfcacdf17be 100644 --- a/external/CHANGELOG.json +++ b/external/CHANGELOG.json @@ -1,722 +1,730 @@ -{ - "2026": { - "january": [ - "Added `$addTextDisplay[]`", - "Added `$addSeparator[]`", - "Added `$addContainer[]`", - "Added `$addSection[]`", - "Added `$addThumbnail[]`", - "Added `$addMediaGallery[]`", - "Added `$addMediaGalleryItem[]`", - "Added `$addActionRow[]`", - "Added `$addButtonCV2`", - "Added `$addMentionableSelect`", - "Added `$getMentionableSelectUserID`", - "Added `$getMentionableSelectUserIDs`", - "Added `$getMentionableSelectUserCount`" - ] - }, - "2025": { - "january": [ - "Added `$afkChannelID`", - "Added `$afkTimeout[]`", - "Added `$boostLevel`", - "Added `$byteCount[]`", - "Added `$commandFolder`", - "Added `$commandName`", - "Added `$commandTrigger`", - "Added `$emojiExists[]`", - "Added `$emojiName[]`", - "Added `$getAttachments[]`", - "Added `$getSlowmode[]`", - "Added `$guildBanner[]`", - "Added `$isEmojiAnimated[]`", - "Added `$isMessageEdited[]`", - "Added `$lastMessageID`", - "Added `$lastPinTimestamp`", - "Added `$linesCount[]`", - "Added `$messageEditedTimestamp[]`", - "Added `$rolePerms[]`", - "Added `$rulesChannelID[]`", - "Added `$systemChannelID`", - "Added `$threadMessageCount`", - "Added `$threadUserCount`", - "Added `$voiceUserLimit[]`" - ] - }, - "2024": { - "august": [ - "Added `$log[]`", - "Added `$logQuota`", - "Added `$suppressErrorLogging`", - "Added `$ceil[]`", - "Added `$floor[]`", - "Added `$sqrt[]`", - "Added `$isInteger[]`" - ], - "july": [ - "Added `$isBooster[]`", - "Added `$setUserRoles[]`", - "Added `$getLeaderboardPosition[]`" - ], - "june": ["Added `$ai[]`", "Added `$aiQuota`"], - "march": [ - "Fixed the bot sometimes duplicating its answer", - "Fixed `$onlyForIDs[]` not working correctly on big nodes" - ] - }, - "2023": { - "june": [ - "Fixed custom images not always being displayed", - "Allowed for empty string values in `$jsonSetString[]`", - "Added `$jsonArraySort[]`", - "Added `$jsonArrayReverse[]`", - "JSON Array function now can interact with JSON root", - "Emoji argument now allows for emoji aliases", - "Added `$nodeVersion[]`", - "Added `$removeEmoji[]`", - "Added `$addMessageReactions[]`", - "Fixed `$nickname[]` to work with the new Discord username system", - "Added `$displayName[]`", - "Added `$userBadges[]`", - "Added `$userBannerColor[]`" - ], - "may": ["Fixed `$min[]` and `$max[]` not working with floats"], - "april": ["Fixed caching timeout information"], - "march": [ - "Fixed callbacks not always getting detected", - "Fixed JSON functions inability to correctly return an object", - "Fixed `$jsonArrayPop[]` and `$jsonArrayShift[]` only working once on an array", - "Fixed a bug where `$jsonArrayPop[]` and `$jsonArrayShift[]` would stop execution when trying to operate on an empty array", - "Fixed `$round[]` adding trailing zeros", - "Added `$removeAllComponents`" - ], - "february": [ - "Fixed caching issues for leaderboards", - "Added `$jsonArrayShift[]`", - "Added `$jsonArrayUnshift[]`", - "Added `$jsonArrayPop[]`", - "Added `$jsonJoinArray[]`" - ], - "january": [ - "Added `$jsonParse[]`", - "Added `$jsonClear`", - "Added `$jsonStringify`", - "Added `$jsonPretty[]`", - "Added `$json[]`", - "Added `$jsonExists[]`", - "Added `$jsonSet[]`", - "Added `$jsonArray[]`", - "Added `$jsonArrayAppend[]`", - "Added `$jsonArrayCount[]`", - "Added `$jsonUnset[]`", - "Added `$disableInnerSpaceRemoval`", - "Fixed big numbers not working in leaderboard functions", - "Added Emoji argument type", - "Added `$isTicket[]`", - "Added `$userBanner[]`", - "Added `$randomGuildID`", - "Added `$randomRoleID[]`", - "Added `$randomCategoryID[]`", - "Added `$channelNames[]`", - "Added `$categoryChannels[]`", - "Fixed `$allowUserMentions[]` not working on slash commands", - "Fixed `$addTextInput[]` not working with empty values", - "Added `$jsonSetString[]`", - "Added `$jsonArrayIndex[]`" - ] - }, - "2022": { - "december": [ - "Added limit on input numbers to 2128 on the basic math functions", - "Fixed BDScript 2 having problems with handling unicode characters", - "Fixed `$stop` causing undefined behaviour", - "Added `$getBanReason[]`", - "Fixed caching issues for the text splitting functions", - "Fixed issues with custom images" - ], - "november": [ - "Deprecated `$userJoinedDiscord[]` in favor of `$creationDate[]`", - "Added `Format` argument to `$creationDate[]`", - "Added `$editSplitText[]`", - "Added `$serverEmojis[]`", - "Added `$setChannelVar[]`", - "Added `$getChannelVar[]`", - "Added `$resetChannelVar[]`", - "Added `channel` option to `$variablesCount[]`", - "Fixed BDScript 2's escaping not working in some cases" - ], - "october": [ - "Added `$publishMessage[]`", - "Made `$useChannel[]` work with message components", - "Added `$channelPosition[]`", - "Added `$categoryID`", - "Added `$varExists[]`", - "Added `$boostCount`", - "Added `$categoryCount`", - "Added `$isTimedOut[]`", - "Added `stage` and `forum` channel types to `$createChannel[]`", - "Added `stage`, `announcement`, and `forum` channel types to `$channelType[]`", - "`$enableDecimals[]` now works with `$calculate[]`", - "Added `$getCustomStatus[]`", - "Added `$httpStatus`", - "Added `$httpGetHeader[]`", - "Added `$botOwnerID`", - "Added `$repliedMessageID`", - "Fixed the guild list fetching issue", - "Added `$parentID`" - ], - "september": [ - "Added `channelID` field to `$awaitFunc[]`", - "Added `$trimContent`", - "Fixed fetching guilds not always working in the app", - "Added `$slashID`", - "Fixed slash command reordering", - "Added intent autodetection ", - "Added `globaluser` option to `$variablesCount[]`", - "Added support for big numbers in the math functions", - "Added new text tutorial", - "Fixed `$checkUserPerms[]` ignoring channel permissions", - "Fixed `$addReactions[]` not working on slash commands", - "Fixed `Ticket number` argument not working in `$newTicket[]`", - "Fixed `$httpAddHeader[]`", - "Fixed some callbacks not being detected as callbacks", - "Fixed attachments not working in slash commands" - ], - "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 is passed to `$getUserVar[]`" - ], - "april": [ - "Added `'return ID of the ticket message'` argument to `$newTicket[]`", - "Fixed disappearing slash commands from the app's state" - ], - "march": [ - "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 backslash 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 (`/`) 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[]` and `$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 an 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 script language", - "Added to BDScript 2:", - "- `$try`, `$catch` and `$error`", - "- `$eval[]`", - "- `$optOff[]`", - "- `$stop[]`", - "- `$var[]`", - "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[]` to 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[]`" - ], - "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 an 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 a problem with statuses not showing up", - "Fixed an 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 is now returned instead of `everyone` 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 `$resetUserVar`", - "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", - "Fixed `$userID[]` to 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[]`", - "Added multi-line support 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 multi-line support for `$textSplit[]`", - "Fixed brackets in `$username`" - ] - }, - "2019": { - "december": [ - "Fixed high ping issues", - "Fixed whole bunch of other issues", - "Added to JS:", - "- authorId", - "- channelId", - "- userMentions", - "- roleMentions", - "- unban()", - "- takeRole()", - "- giveRole()", - "- channelTyping()", - "- createChannel()", - "- removeChannel()", - "- unpinMessage()", - "- banWithReason()", - "- kickWithReason()", - "- removeRole()", - "- createRole()", - "Created status website ", - "Web version of *Bot Designer for Discord* has been moved to new address ", - "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" - ] - } -} +{ + "2026": { + "january": [ + "Added `$addTextDisplay[]`", + "Added `$addSeparator[]`", + "Added `$addContainer[]`", + "Added `$addSection[]`", + "Added `$addThumbnail[]`", + "Added `$addMediaGallery[]`", + "Added `$addMediaGalleryItem[]`", + "Added `$addActionRow[]`", + "Added `$addButtonCV2`", + "Added `$addMentionableSelect`", + "Added `$getMentionableSelectUserID`", + "Added `$getMentionableSelectUserIDs`", + "Added `$getMentionableSelectUserCount`", + "Added `$addUserSelect`", + "Added `$getUserSelectUserID`", + "Added `$getUserSelectUserIDs`", + "Added `$getUserSelectUserCount`", + "Added `$addRoleSelect`", + "Added `$getRoleSelectRoleID`", + "Added `$getRoleSelectRoleIDs`", + "Added `$getRoleSelectRoleCount`" + ] + }, + "2025": { + "january": [ + "Added `$afkChannelID`", + "Added `$afkTimeout[]`", + "Added `$boostLevel`", + "Added `$byteCount[]`", + "Added `$commandFolder`", + "Added `$commandName`", + "Added `$commandTrigger`", + "Added `$emojiExists[]`", + "Added `$emojiName[]`", + "Added `$getAttachments[]`", + "Added `$getSlowmode[]`", + "Added `$guildBanner[]`", + "Added `$isEmojiAnimated[]`", + "Added `$isMessageEdited[]`", + "Added `$lastMessageID`", + "Added `$lastPinTimestamp`", + "Added `$linesCount[]`", + "Added `$messageEditedTimestamp[]`", + "Added `$rolePerms[]`", + "Added `$rulesChannelID[]`", + "Added `$systemChannelID`", + "Added `$threadMessageCount`", + "Added `$threadUserCount`", + "Added `$voiceUserLimit[]`" + ] + }, + "2024": { + "august": [ + "Added `$log[]`", + "Added `$logQuota`", + "Added `$suppressErrorLogging`", + "Added `$ceil[]`", + "Added `$floor[]`", + "Added `$sqrt[]`", + "Added `$isInteger[]`" + ], + "july": [ + "Added `$isBooster[]`", + "Added `$setUserRoles[]`", + "Added `$getLeaderboardPosition[]`" + ], + "june": ["Added `$ai[]`", "Added `$aiQuota`"], + "march": [ + "Fixed the bot sometimes duplicating its answer", + "Fixed `$onlyForIDs[]` not working correctly on big nodes" + ] + }, + "2023": { + "june": [ + "Fixed custom images not always being displayed", + "Allowed for empty string values in `$jsonSetString[]`", + "Added `$jsonArraySort[]`", + "Added `$jsonArrayReverse[]`", + "JSON Array function now can interact with JSON root", + "Emoji argument now allows for emoji aliases", + "Added `$nodeVersion[]`", + "Added `$removeEmoji[]`", + "Added `$addMessageReactions[]`", + "Fixed `$nickname[]` to work with the new Discord username system", + "Added `$displayName[]`", + "Added `$userBadges[]`", + "Added `$userBannerColor[]`" + ], + "may": ["Fixed `$min[]` and `$max[]` not working with floats"], + "april": ["Fixed caching timeout information"], + "march": [ + "Fixed callbacks not always getting detected", + "Fixed JSON functions inability to correctly return an object", + "Fixed `$jsonArrayPop[]` and `$jsonArrayShift[]` only working once on an array", + "Fixed a bug where `$jsonArrayPop[]` and `$jsonArrayShift[]` would stop execution when trying to operate on an empty array", + "Fixed `$round[]` adding trailing zeros", + "Added `$removeAllComponents`" + ], + "february": [ + "Fixed caching issues for leaderboards", + "Added `$jsonArrayShift[]`", + "Added `$jsonArrayUnshift[]`", + "Added `$jsonArrayPop[]`", + "Added `$jsonJoinArray[]`" + ], + "january": [ + "Added `$jsonParse[]`", + "Added `$jsonClear`", + "Added `$jsonStringify`", + "Added `$jsonPretty[]`", + "Added `$json[]`", + "Added `$jsonExists[]`", + "Added `$jsonSet[]`", + "Added `$jsonArray[]`", + "Added `$jsonArrayAppend[]`", + "Added `$jsonArrayCount[]`", + "Added `$jsonUnset[]`", + "Added `$disableInnerSpaceRemoval`", + "Fixed big numbers not working in leaderboard functions", + "Added Emoji argument type", + "Added `$isTicket[]`", + "Added `$userBanner[]`", + "Added `$randomGuildID`", + "Added `$randomRoleID[]`", + "Added `$randomCategoryID[]`", + "Added `$channelNames[]`", + "Added `$categoryChannels[]`", + "Fixed `$allowUserMentions[]` not working on slash commands", + "Fixed `$addTextInput[]` not working with empty values", + "Added `$jsonSetString[]`", + "Added `$jsonArrayIndex[]`" + ] + }, + "2022": { + "december": [ + "Added limit on input numbers to 2128 on the basic math functions", + "Fixed BDScript 2 having problems with handling unicode characters", + "Fixed `$stop` causing undefined behaviour", + "Added `$getBanReason[]`", + "Fixed caching issues for the text splitting functions", + "Fixed issues with custom images" + ], + "november": [ + "Deprecated `$userJoinedDiscord[]` in favor of `$creationDate[]`", + "Added `Format` argument to `$creationDate[]`", + "Added `$editSplitText[]`", + "Added `$serverEmojis[]`", + "Added `$setChannelVar[]`", + "Added `$getChannelVar[]`", + "Added `$resetChannelVar[]`", + "Added `channel` option to `$variablesCount[]`", + "Fixed BDScript 2's escaping not working in some cases" + ], + "october": [ + "Added `$publishMessage[]`", + "Made `$useChannel[]` work with message components", + "Added `$channelPosition[]`", + "Added `$categoryID`", + "Added `$varExists[]`", + "Added `$boostCount`", + "Added `$categoryCount`", + "Added `$isTimedOut[]`", + "Added `stage` and `forum` channel types to `$createChannel[]`", + "Added `stage`, `announcement`, and `forum` channel types to `$channelType[]`", + "`$enableDecimals[]` now works with `$calculate[]`", + "Added `$getCustomStatus[]`", + "Added `$httpStatus`", + "Added `$httpGetHeader[]`", + "Added `$botOwnerID`", + "Added `$repliedMessageID`", + "Fixed the guild list fetching issue", + "Added `$parentID`" + ], + "september": [ + "Added `channelID` field to `$awaitFunc[]`", + "Added `$trimContent`", + "Fixed fetching guilds not always working in the app", + "Added `$slashID`", + "Fixed slash command reordering", + "Added intent autodetection ", + "Added `globaluser` option to `$variablesCount[]`", + "Added support for big numbers in the math functions", + "Added new text tutorial", + "Fixed `$checkUserPerms[]` ignoring channel permissions", + "Fixed `$addReactions[]` not working on slash commands", + "Fixed `Ticket number` argument not working in `$newTicket[]`", + "Fixed `$httpAddHeader[]`", + "Fixed some callbacks not being detected as callbacks", + "Fixed attachments not working in slash commands" + ], + "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 is passed to `$getUserVar[]`" + ], + "april": [ + "Added `'return ID of the ticket message'` argument to `$newTicket[]`", + "Fixed disappearing slash commands from the app's state" + ], + "march": [ + "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 backslash 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 (`/`) 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[]` and `$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 an 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 script language", + "Added to BDScript 2:", + "- `$try`, `$catch` and `$error`", + "- `$eval[]`", + "- `$optOff[]`", + "- `$stop[]`", + "- `$var[]`", + "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[]` to 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[]`" + ], + "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 an 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 a problem with statuses not showing up", + "Fixed an 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 is now returned instead of `everyone` 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 `$resetUserVar`", + "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", + "Fixed `$userID[]` to 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[]`", + "Added multi-line support 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 multi-line support for `$textSplit[]`", + "Fixed brackets in `$username`" + ] + }, + "2019": { + "december": [ + "Fixed high ping issues", + "Fixed whole bunch of other issues", + "Added to JS:", + "- authorId", + "- channelId", + "- userMentions", + "- roleMentions", + "- unban()", + "- takeRole()", + "- giveRole()", + "- channelTyping()", + "- createChannel()", + "- removeChannel()", + "- unpinMessage()", + "- banWithReason()", + "- kickWithReason()", + "- removeRole()", + "- createRole()", + "Created status website ", + "Web version of *Bot Designer for Discord* has been moved to new address ", + "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" + ] + } +} diff --git a/src/404.md b/src/404.md index 34cddf8b931..65c0905cb38 100644 --- a/src/404.md +++ b/src/404.md @@ -48,4 +48,4 @@ Back to Home - + \ No newline at end of file diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index fd69f837658..3d5c3f06b23 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -1,31 +1,75 @@ # Changelog -# 2026 -## January -Added multiple Components V2 functions: -- Added `$addTextDisplay[]` -- Added `$addSeparator[]` -- Added `$addContainer[]` -- Added `$addSection[]` -- Added `$addThumbnail[]` -- Added `$addMediaGallery[]` -- Added `$addMediaGallery[]` -- Added `$addMediaGalleryItem[]` -- Added `$addActionRow[]` -- Added `$addButtonCV2[]` -- Added `$addMentionableSelect[]` -- Added `$getMentionableSelectUserID[]` -- Added `$getMentionableSelectUserIDs[]` -- Added `$getMentionableSelectUserCount` + + +# 2026 + +## January +Added Components V2 functions: +- Added `$addTextDisplay[]` +- Added `$addSeparator[]` +- Added `$addContainer[]` +- Added `$addSection[]` +- Added `$addThumbnail[]` +- Added `$addMediaGallery[]` +- Added `$addMediaGallery[]` +- Added `$addMediaGalleryItem[]` +- Added `$addActionRow[]` +- Added `$addButtonCV2[]` +- Added `$addMentionableSelect[]` +- Added `$getMentionableSelectUserID[]` +- Added `$getMentionableSelectUserIDs[]` +- Added `$getMentionableSelectUserCount` +- Added `$addUserSelect` +- Added `$getUserSelectUserID` +- Added `$getUserSelectUserIDs` +- Added `$getUserSelectUserCount` +- Added `$addRoleSelect` +- Added `$getRoleSelectRoleID` +- Added `$getRoleSelectRoleIDs` +- Added `$getRoleSelectRoleCount` # 2025 +## December +- Added "Sign out other sessions" button +- Smoother animations in the app +- Redesigned Premium Points shop +- A lot of app bug fixes +- HTTP Timeout Limit: 5s > 35s +- Fixed `$ceil[]` +- Fixed `$floor[]` +- Fixed `$getLeaderboardPosition[]` +- AI Quota: 5000 > 10000 +- Log Quota: 1500 > 3000 +- Updated BDFD App icon for Android + +
Previous Updates + +## November +- Major improvements to hosting infrastructure +- Reworked bot status preview +- HTTP Timeout Limit: 15s > 5s + +## October +- Added setting to disable code highlighting in the command editor + +## September +- Updated BDFD App icon for iOS 26 +- Reworked bot list + +## July +- BDScript bug fixes + +## February +- Fixed app crashing during premium points purchases + ## January - Added `$afkChannelID` - Added `$afkTimeout[]` @@ -52,6 +96,8 @@ Added multiple Components V2 functions: - Added `$threadUserCount` - Added `$voiceUserLimit[]` +
+ # 2024 ## August @@ -757,10 +803,13 @@ Added multiple Components V2 functions: - Released new stable version +```admonish abstract title="Flowchart Changelog" +If you want to see the BDScript changelog, [click here](./FLOWCHART_CHANGELOG.md). +``` + ```admonish tip If you want to access this changelog externally, we have a [JSON version](https://raw.githubusercontent.com/NilPointer-Software/bdfd-wiki/dev/external/CHANGELOG.json) of the changelog to which you can send a GET request and work with a JSON document further. ``` -```admonish abstract title="Flowchart Changelog" -If you want to see the BDScript changelog, [click here](./FLOWCHART_CHANGELOG.md). -``` + + diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 500d2659100..8dff831fcec 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -42,6 +42,12 @@ - [Share Code](./guides/other/sharecode.md) - [Common BDFD Errors](./guides/other/commonErrors.md) +- [Tools]() + - [Color](./tools/color.md) + - [Text Editor](./tools/editor.md) + - [Permission Calculator](./tools/permissionscalculator.md) + - [Timestamp Converter](./tools/timestamp.md) + - [Resources]() - [Introduction](./resources/introduction.md) - [BDFD API](./resources/api.md) @@ -58,412 +64,444 @@ - [Functions]() - [Introduction](./bdscript/introduction.md) - - [$addButton](./bdscript/addButton.md) - - [$addCmdReactions](./bdscript/addCmdReactions.md) - - [$addEmoji](./bdscript/addEmoji.md) - - [$addField](./bdscript/addField.md) - - [$addMessageReactions](./bdscript/addMessageReactions.md) - - [$addReactions](./bdscript/addReactions.md) - - [$addSelectMenuOption](./bdscript/addSelectMenuOption.md) - - [$addTextInput](./bdscript/addTextInput.md) - - [$addTimestamp](./bdscript/addTimestamp.md) - - [$addTimestamp[]](./bdscript/addTimestampComplex.md) - - [$afkChannelID](./bdscript/afkChannelID.md) - - [$afkTimeout](./bdscript/afkTimeout.md) - - [$allMembersCount](./bdscript/allMembersCount.md) - - [$allowMention](./bdscript/allowMention.md) - - [$allowRoleMentions](./bdscript/allowRoleMentions.md) - - [$allowUserMentions](./bdscript/allowUserMentions.md) - - [$alternativeParsing](./bdscript/alternativeParsing.md) - - [$and](./bdscript/and.md) - - [$argCount](./bdscript/argCount.md) - - [$argsCheck](./bdscript/argsCheck.md) - - [$author](./bdscript/author.md) - - [$authorAvatar](./bdscript/authorAvatar.md) - - [$authorIcon](./bdscript/authorIcon.md) - - [$authorID](./bdscript/authorID.md) - - [$authorOfMessage](./bdscript/authorOfMessage.md) - - [$authorURL](./bdscript/authorURL.md) - - [$awaitFunc](./bdscript/awaitFunc.md) - - [$ban](./bdscript/ban.md) - - [$ban[]](./bdscript/banComplex.md) - - [$banID](./bdscript/banID.md) - - [$banID[]](./bdscript/banIDComplex.md) - - [$blackListIDs](./bdscript/blackListIDs.md) - - [$blackListRoles](./bdscript/blackListRoles.md) - - [$blackListRolesIDs](./bdscript/blackListRolesIDs.md) - - [$blackListServers](./bdscript/blackListServers.md) - - [$blackListUsers](./bdscript/blackListUsers.md) - - [$boostCount](./bdscript/boostCount.md) - - [$boostCount[]](./bdscript/boostCountComplex.md) - - [$boostLevel](./bdscript/boostLevel.md) - - [$botCommands](./bdscript/botCommands.md) - - [$botID](./bdscript/botID.md) - - [$botLeave](./bdscript/botLeave.md) - - [$botLeave[]](./bdscript/botLeaveComplex.md) - - [$botListDescription](./bdscript/botListDescription.md) - - [$botListHide](./bdscript/botListHide.md) - - [$botNode](./bdscript/botNode.md) - - [$botOwnerID](./bdscript/botOwnerID.md) - - [$botTyping](./bdscript/botTyping.md) - - [$byteCount](./bdscript/byteCount.md) - - [$c](./bdscript/c.md) - - [$calculate](./bdscript/calculate.md) - - [$catch](./bdscript/catch.md) - - [$categoryChannels](./bdscript/categoryChannels.md) - - [$categoryCount](./bdscript/categoryCount.md) - - [$categoryCount[]](./bdscript/categoryCountComplex.md) - - [$categoryID](./bdscript/categoryID.md) - - [$ceil](./bdscript/ceil.md) - - [$changeCooldownTime](./bdscript/changeCooldownTime.md) - - [$changeUsername](./bdscript/changeUsername.md) - - [$changeUsernameWithID](./bdscript/changeUsernameWithID.md) - - [$channelCount](./bdscript/channelCount.md) - - [$channelExists](./bdscript/channelExists.md) - - [$channelID](./bdscript/channelID.md) - - [$channelID[]](./bdscript/channelIDComplex.md) - - [$channelIDFromName](./bdscript/channelIDFromName.md) - - [$channelName](./bdscript/channelName.md) - - [$channelNames](./bdscript/channelNames.md) - - [$channelPosition](./bdscript/channelPosition.md) - - [$channelPosition[]](./bdscript/channelPositionComplex.md) - - [$channelSendMessage](./bdscript/channelSendMessage.md) - - [$channelTopic](./bdscript/channelTopic.md) - - [$channelTopic[]](./bdscript/channelTopicComplex.md) - - [$channelType](./bdscript/channelType.md) - - [$charCount](./bdscript/charCount.md) - - [$checkCondition](./bdscript/checkCondition.md) - - [$checkContains](./bdscript/checkContains.md) - - [$checkUserPerms](./bdscript/checkUserPerms.md) - - [$clear](./bdscript/clear.md) - - [$clear[]](./bdscript/clearComplex.md) - - [$clearReactions](./bdscript/clearReactions.md) - - [$closeTicket](./bdscript/closeTicket.md) - - [$color](./bdscript/color.md) - - [$colorRole](./bdscript/colorRole.md) - - [$commandFolder](./bdscript/commandFolder.md) - - [$commandName](./bdscript/commandName.md) - - [$commandTrigger](./bdscript/commandTrigger.md) - - [$commandsCount](./bdscript/commandsCount.md) - - [$cooldown](./bdscript/cooldown.md) - - [$createChannel](./bdscript/createChannel.md) - - [$createRole](./bdscript/createRole.md) - - [$creationDate](./bdscript/creationDate.md) - - [$cropText](./bdscript/cropText.md) - - [$customEmoji](./bdscript/customEmoji.md) - - [$customID](./bdscript/customID.md) - - [$date](./bdscript/date.md) - - [$day](./bdscript/day.md) - - [$defer](./bdscript/defer.md) - - [$deleteChannels](./bdscript/deleteChannels.md) - - [$deleteChannelsByName](./bdscript/deleteChannelsByName.md) - - [$deletecommand](./bdscript/deletecommand.md) - - [$deleteIn](./bdscript/deleteIn.md) - - [$deleteMessage](./bdscript/deleteMessage.md) - - [$deleteRole](./bdscript/deleteRole.md) - - [$description](./bdscript/description.md) - - [$disableInnerSpaceRemoval](./bdscript/disableInnerSpaceRemoval.md) - - [$disableSpecialEscaping](./bdscript/disableSpecialEscaping.md) - - [$discriminator](./bdscript/discriminator.md) - - [$displayName](./bdscript/displayName.md) - - [$displayName[]](./bdscript/displayNameComplex.md) - - [$divide](./bdscript/divide.md) - - [$dm](./bdscript/dm.md) - - [$dm[]](./bdscript/dmComplex.md) - - [$dmChannelID](./bdscript/dmChannelID.md) - - [$editButton](./bdscript/editButton.md) - - [$editChannelPerms](./bdscript/editChannelPerms.md) - - [$editEmbedIn](./bdscript/editEmbedIn.md) - - [$editIn](./bdscript/editIn.md) - - [$editMessage](./bdscript/editMessage.md) - - [$editSelectMenu](./bdscript/editSelectMenu.md) - - [$editSelectMenuOption](./bdscript/editSelectMenuOption.md) - - [$editSplitText](./bdscript/editSplitText.md) - - [$editThread](./bdscript/editThread.md) - - [$else](./bdscript/else.md) - - [$elseif](./bdscript/elseif.md) - - [$embeddedURL](./bdscript/embeddedURL.md) - - [$embedSuppressErrors](./bdscript/embedSuppressErrors.md) - - [$emojiExists](./bdscript/emojiExists.md) - - [$emojiName](./bdscript/emojiName.md) - - [$emoteCount](./bdscript/emoteCount.md) - - [$enabled](./bdscript/enabled.md) - - [$enableDecimals](./bdscript/enableDecimals.md) - - [$endif](./bdscript/endif.md) - - [$endtry](./bdscript/endtry.md) - - [$ephemeral](./bdscript/ephemeral.md) - - [$error](./bdscript/error.md) - - [$eval](./bdscript/eval.md) - - [$executionTime](./bdscript/executionTime.md) - - [$findChannel](./bdscript/findChannel.md) - - [$findRole](./bdscript/findRole.md) - - [$findUser](./bdscript/findUser.md) - - [$floor](./bdscript/floor.md) - - [$footer](./bdscript/footer.md) - - [$footerIcon](./bdscript/footerIcon.md) - - [$getAttachments](./bdscript/getAttachments.md) - - [$getBanReason](./bdscript/getBanReason.md) - - [$getBotInvite](./bdscript/getBotInvite.md) - - [$getChannelVar](./bdscript/getChannelVar.md) - - [$getCooldown](./bdscript/getCooldown.md) - - [$getCustomStatus](./bdscript/getCustomStatus.md) - - [$getEmbedData](./bdscript/getEmbedData.md) - - [$getInviteInfo](./bdscript/getInviteInfo.md) - - [$getLeaderboardPosition](./bdscript/getLeaderboardPosition.md) - - [$getLeaderboardValue](./bdscript/getLeaderboardValue.md) - - [$getMessage](./bdscript/getMessage.md) - - [$getReactions](./bdscript/getReactions.md) - - [$getRoleColor](./bdscript/getRoleColor.md) - - [$getServerInvite](./bdscript/getServerInvite.md) - - [$getServerInvite[]](./bdscript/getServerInviteComplex.md) - - [$getServerVar](./bdscript/getServerVar.md) - - [$getSlowmode](./bdscript/getSlowmode.md) - - [$getTextSplitIndex](./bdscript/getTextSplitIndex.md) - - [$getTextSplitLength](./bdscript/getTextSplitLength.md) - - [$getTimestamp](./bdscript/getTimestamp.md) - - [$getTimestamp[]](./bdscript/getTimestampComplex.md) - - [$getUserStatus](./bdscript/getUserStatus.md) - - [$getUserVar](./bdscript/getUserVar.md) - - [$getVar](./bdscript/getVar.md) - - [$giveRole](./bdscript/giveRole.md) - - [$globalCooldown](./bdscript/globalCooldown.md) - - [$globalUserLeaderboard](./bdscript/globalUserLeaderboard.md) - - [$guildBanner](./bdscript/guildBanner.md) - - [$guildExists](./bdscript/guildExists.md) - - [$guildID](./bdscript/guildID.md) - - [$guildID[]](./bdscript/guildIDComplex.md) - - [$hasRole](./bdscript/hasRole.md) - - [$highestRole](./bdscript/highestRole.md) - - [$highestRole[]](./bdscript/highestRoleComplex.md) - - [$highestRoleWithPerms](./bdscript/highestRoleWithPerms.md) - - [$hostingExpireTime](./bdscript/hostingExpireTime.md) - - [$hostingExpireTime[]](./bdscript/hostingExpireTimeComplex.md) - - [$hour](./bdscript/hour.md) - - [$hypesquad](./bdscript/hypesquad.md) - - [$if](./bdscript/if.md) - - [$ignoreChannels](./bdscript/ignoreChannels.md) - - [$ignoreLinks](./bdscript/ignoreLinks.md) - - [$image](./bdscript/image.md) - - [$input](./bdscript/input.md) - - [$isAdmin](./bdscript/isAdmin.md) - - [$isBanned](./bdscript/isBanned.md) - - [$isBoolean](./bdscript/isBoolean.md) - - [$isBooster](./bdscript/isBooster.md) - - [$isBot](./bdscript/isBot.md) - - [$isEmojiAnimated](./bdscript/isEmojiAnimated.md) - - [$isHoisted](./bdscript/isHoisted.md) - - [$isInteger](./bdscript/isInteger.md) - - [$isMentionable](./bdscript/isMentionable.md) - - [$isMentioned](./bdscript/isMentioned.md) - - [$isMessageEdited](./bdscript/isMessageEdited.md) - - [$isNSFW](./bdscript/isNSFW.md) - - [$isNumber](./bdscript/isNumber.md) - - [$isSlash](./bdscript/isSlash.md) - - [$isTicket](./bdscript/isTicket.md) - - [$isTimedOut](./bdscript/isTimedOut.md) - - [$isUserDMEnabled](./bdscript/isUserDMEnabled.md) - - [$isValidHex](./bdscript/isValidHex.md) - - [$joinSplitText](./bdscript/joinSplitText.md) - - [$kick](./bdscript/kick.md) - - [$kick[]](./bdscript/kickComplex.md) - - [$kickMention](./bdscript/kickMention.md) - - [$lastMessageID](./bdscript/lastMessageID.md) - - [$lastPinTimestamp](./bdscript/lastPinTimestamp.md) - - [$linesCount](./bdscript/linesCount.md) - - [$lowestRole](./bdscript/lowestRole.md) - - [$lowestRole[]](./bdscript/lowestRoleComplex.md) - - [$lowestRoleWithPerms](./bdscript/lowestRoleWithPerms.md) - - [$max](./bdscript/max.md) - - [$membersCount](./bdscript/membersCount.md) - - [$membersCount[]](./bdscript/membersCountComplex.md) - - [$mentioned](./bdscript/mentioned.md) - - [$mentionedChannels](./bdscript/mentionedChannels.md) - - [$mentionedRoles](./bdscript/mentionedRoles.md) - - [$message](./bdscript/message.md) - - [$message[]](./bdscript/messageComplex.md) - - [$messageEditedTimestamp](./bdscript/messageEditedTimestamp.md) - - [$messageID](./bdscript/messageID.md) - - [$min](./bdscript/min.md) - - [$minute](./bdscript/minute.md) - - [$modifyChannel](./bdscript/modifyChannel.md) - - [$modifyChannelPerms](./bdscript/modifyChannelPerms.md) - - [$modifyRole](./bdscript/modifyRole.md) - - [$modifyRolePerms](./bdscript/modifyRolePerms.md) - - [$modulo](./bdscript/modulo.md) - - [$month](./bdscript/month.md) - - [$multi](./bdscript/multi.md) - - [$mute](./bdscript/mute.md) - - [$newModal](./bdscript/newModal.md) - - [$newSelectMenu](./bdscript/newSelectMenu.md) - - [$newTicket](./bdscript/newTicket.md) - - [$nickname](./bdscript/nickname.md) - - [$nickname[]](./bdscript/nicknameComplex.md) - - [$nomention](./bdscript/nomention.md) - - [$noMentionMessage](./bdscript/noMentionMessage.md) - - [$noMentionMessage[]](./bdscript/noMentionMessageComplex.md) - - [$nodeVersion](./bdscript/nodeVersion.md) - - [$nodeVersion[]](./bdscript/nodeVersionComplex.md) - - [$numberSeparator](./bdscript/numberSeparator.md) - - [$onlyAdmin](./bdscript/onlyAdmin.md) - - [$onlyBotChannelPerms](./bdscript/onlyBotChannelPerms.md) - - [$onlyBotPerms](./bdscript/onlyBotPerms.md) - - [$onlyForCategories](./bdscript/onlyForCategories.md) - - [$onlyForChannels](./bdscript/onlyForChannels.md) - - [$onlyForIDs](./bdscript/onlyForIDs.md) - - [$onlyForRoles](./bdscript/onlyForRoles.md) - - [$onlyForRoleIDs](./bdscript/onlyForRoleIDs.md) - - [$onlyForServers](./bdscript/onlyForServers.md) - - [$onlyForUsers](./bdscript/onlyForUsers.md) - - [$onlyIf](./bdscript/onlyIf.md) - - [$onlyIfMessageContains](./bdscript/onlyIfMessageContains.md) - - [$onlyNSFW](./bdscript/onlyNSFW.md) - - [$onlyPerms](./bdscript/onlyPerms.md) - - [$optOff](./bdscript/optOff.md) - - [$or](./bdscript/or.md) - - [$parentID](./bdscript/parentID.md) - - [$parentID[]](./bdscript/parentIDComplex.md) - - [$ping](./bdscript/ping.md) - - [$pinMessage](./bdscript/pinMessage.md) - - [$pinMessage[]](./bdscript/pinMessageComplex.md) - - [$premiumExpireTime](./bdscript/premiumExpireTime.md) - - [$publishMessage](./bdscript/publishMessage.md) - - [$random](./bdscript/random.md) - - [$random[]](./bdscript/randomComplex.md) - - [$randomCategoryID](./bdscript/randomCategoryID.md) - - [$randomChannelID](./bdscript/randomChannelID.md) - - [$randomGuildID](./bdscript/randomGuildID.md) - - [$randomMention](./bdscript/randomMention.md) - - [$randomRoleID](./bdscript/randomRoleID.md) - - [$randomString](./bdscript/randomString.md) - - [$randomText](./bdscript/randomText.md) - - [$randomUser](./bdscript/randomUser.md) - - [$randomUserID](./bdscript/randomUserID.md) - - [$registerGuildCommands](./bdscript/registerGuildCommands.md) - - [$registerGuildCommands[]](./bdscript/registerGuildCommandsComplex.md) - - [$removeAllComponents](./bdscript/removeAllComponents.md) - - [$removeAllComponents[]](./bdscript/removeAllComponentsComplex.md) - - [$removeButtons](./bdscript/removeButtons.md) - - [$removeButtons[]](./bdscript/removeButtonsComplex.md) - - [$removeComponent](./bdscript/removeComponent.md) - - [$removeContains](./bdscript/removeContains.md) - - [$removeEmoji](./bdscript/removeEmoji.md) - - [$removeLinks](./bdscript/removeLinks.md) - - [$removeLinks[]](./bdscript/removeLinksComplex.md) - - [$removeSplitTextElement](./bdscript/removeSplitTextElement.md) - - [$repeatMessage](./bdscript/repeatMessage.md) - - [$replaceText](./bdscript/replaceText.md) - - [$repliedMessageID](./bdscript/repliedMessageID.md) - - [$repliedMessageID[]](./bdscript/repliedMessageIDComplex.md) - - [$reply](./bdscript/reply.md) - - [$reply[]](./bdscript/replyComplex.md) - - [$replyIn](./bdscript/replyIn.md) - - [$resetChannelVar](./bdscript/resetChannelVar.md) - - [$resetServerVar](./bdscript/resetServerVar.md) - - [$resetUserVar](./bdscript/resetUserVar.md) - - [$roleCount](./bdscript/roleCount.md) - - [$roleExists](./bdscript/roleExists.md) - - [$roleGrant](./bdscript/roleGrant.md) - - [$roleID](./bdscript/roleID.md) - - [$roleInfo](./bdscript/roleInfo.md) - - [$roleName](./bdscript/roleName.md) - - [$roleNames](./bdscript/roleNames.md) - - [$rolePerms](./bdscript/rolePerms.md) - - [$rolePosition](./bdscript/rolePosition.md) - - [$round](./bdscript/round.md) - - [$rulesChannelID](./bdscript/rulesChannelID.md) - - [$scriptLanguage](./bdscript/scriptLanguage.md) - - [$second](./bdscript/second.md) - - [$sendEmbedMessage](./bdscript/sendEmbedMessage.md) - - [$sendMessage](./bdscript/sendMessage.md) - - [$serverChannelExists](./bdscript/serverChannelExists.md) - - [$serverCooldown](./bdscript/serverCooldown.md) - - [$serverCount](./bdscript/serverCount.md) - - [$serverDescription](./bdscript/serverDescription.md) - - [$serverDescription[]](./bdscript/serverDescriptionComplex.md) - - [$serverEmojis](./bdscript/serverEmojis.md) - - [$serverIcon](./bdscript/serverIcon.md) - - [$serverIcon[]](./bdscript/serverIconComplex.md) - - [$serverInfo](./bdscript/serverInfo.md) - - [$serverLeaderboard](./bdscript/serverLeaderboard.md) - - [$serverName](./bdscript/serverName.md) - - [$serverNames](./bdscript/serverNames.md) - - [$serverNames[]](./bdscript/serverNamesComplex.md) - - [$serverOwner](./bdscript/serverOwner.md) - - [$serverOwner[]](./bdscript/serverOwnerComplex.md) - - [$serverRegion](./bdscript/serverRegion.md) - - [$serverVerificationLvl](./bdscript/serverVerificationLvl.md) - - [$setChannelVar](./bdscript/setChannelVar.md) - - [$setServerVar](./bdscript/setServerVar.md) - - [$setUserRoles](./bdscript/setUserRoles.md) - - [$setUserVar](./bdscript/setUserVar.md) - - [$setVar](./bdscript/setVar.md) - - [$shardID](./bdscript/shardID.md) - - [$shardID[]](./bdscript/shardIDComplex.md) - - [$slashCommandsCount](./bdscript/slashCommandsCount.md) - - [$slashID](./bdscript/slashID.md) - - [$slashID[]](./bdscript/slashIDComplex.md) - - [$slowmode](./bdscript/slowmode.md) - - [$sort](./bdscript/sort.md) - - [$splitText](./bdscript/splitText.md) - - [$sqrt](./bdscript/sqrt.md) - - [$startThread](./bdscript/startThread.md) - - [$stop](./bdscript/stop.md) - - [$sub](./bdscript/sub.md) - - [$sum](./bdscript/sum.md) - - [$suppressErrors](./bdscript/suppressErrors.md) - - [$suppressErrors[]](./bdscript/suppressErrorsComplex.md) - - [$systemChannelID](./bdscript/systemChannelID.md) - - [$takeRole](./bdscript/takeRole.md) - - [$textSplit](./bdscript/textSplit.md) - - [$threadAddMember](./bdscript/threadAddMember.md) - - [$threadMessageCount](./bdscript/threadMessageCount.md) - - [$threadRemoveMember](./bdscript/threadRemoveMember.md) - - [$threadUserCount](./bdscript/threadUserCount.md) - - [$thumbnail](./bdscript/thumbnail.md) - - [$time](./bdscript/time.md) - - [$timeout](./bdscript/timeout.md) - - [$title](./bdscript/title.md) - - [$toLowercase](./bdscript/toLowercase.md) - - [$toTitleCase](./bdscript/toTitleCase.md) - - [$toUppercase](./bdscript/toUppercase.md) - - [$trimContent](./bdscript/trimContent.md) - - [$trimSpace](./bdscript/trimSpace.md) - - [$try](./bdscript/try.md) - - [$tts](./bdscript/tts.md) - - [$unban](./bdscript/unban.md) - - [$unbanID](./bdscript/unbanID.md) - - [$unbanID[]](./bdscript/unbanIDComplex.md) - - [$unescape](./bdscript/unescape.md) - - [$unmute](./bdscript/unmute.md) - - [$unpinMessage](./bdscript/unpinMessage.md) - - [$unregisterGuildCommands](./bdscript/unregisterGuildCommands.md) - - [$unregisterGuildCommands[]](./bdscript/unregisterGuildCommandsComplex.md) - - [$untimeout](./bdscript/untimeout.md) - - [$uptime](./bdscript/uptime.md) - - [$url](./bdscript/url.md) - - [$useChannel](./bdscript/useChannel.md) - - [$userAvatar](./bdscript/userAvatar.md) - - [$userBadges](./bdscript/userBadges.md) - - [$userBanner](./bdscript/userBanner.md) - - [$userBannerColor](./bdscript/userBannerColor.md) - - [$userExists](./bdscript/userExists.md) - - [$userID](./bdscript/userID.md) - - [$userInfo](./bdscript/userInfo.md) - - [$userJoined](./bdscript/userJoined.md) - - [$userJoinedDiscord](./bdscript/userJoinedDiscord.md) - - [$userLeaderboard](./bdscript/userLeaderboard.md) - - [$username](./bdscript/username.md) - - [$username[]](./bdscript/usernameComplex.md) - - [$userPerms](./bdscript/userPerms.md) - - [$userReacted](./bdscript/userReacted.md) - - [$userRoles](./bdscript/userRoles.md) - - [$userServerAvatar](./bdscript/userServerAvatar.md) - - [$var](./bdscript/var.md) - - [$varExistError](./bdscript/varExistError.md) - - [$varExists](./bdscript/varExists.md) - - [$variablesCount](./bdscript/variablesCount.md) - - [$voiceUserLimit](./bdscript/voiceUserLimit.md) - - [$year](./bdscript/year.md) + - [Components]() + - [$addButton](./bdscript/addButton.md) + - [$addSelectMenuOption](./bdscript/addSelectMenuOption.md) + - [$addSeparator](./bdscript/addSeparator.md) + - [$addTextDisplay](./bdscript/addTextDisplay.md) + - [$addTextInput](./bdscript/addTextInput.md) + - [$editButton](./bdscript/editButton.md) + - [$editSelectMenu](./bdscript/editSelectMenu.md) + - [$editSelectMenuOption](./bdscript/editSelectMenuOption.md) + - [$newModal](./bdscript/newModal.md) + - [$newSelectMenu](./bdscript/newSelectMenu.md) + - [$removeAllComponents](./bdscript/removeAllComponents.md) + - [$removeAllComponents[]](./bdscript/removeAllComponentsComplex.md) + - [$removeButtons](./bdscript/removeButtons.md) + - [$removeButtons[]](./bdscript/removeButtonsComplex.md) + - [$removeComponent](./bdscript/removeComponent.md) + - [$defer](./bdscript/defer.md) + - [Embeds]() + - [$addContainer](./bdscript/addContainer.md) + - [$addField](./bdscript/addField.md) + - [$addSection](./bdscript/addSection.md) + - [$addThumbnail](./bdscript/addThumbnail.md) + - [$addTimestamp](./bdscript/addTimestamp.md) + - [$addTimestamp[]](./bdscript/addTimestampComplex.md) + - [$author](./bdscript/author.md) + - [$authorIcon](./bdscript/authorIcon.md) + - [$authorURL](./bdscript/authorURL.md) + - [$color](./bdscript/color.md) + - [$description](./bdscript/description.md) + - [$embeddedURL](./bdscript/embeddedURL.md) + - [$footer](./bdscript/footer.md) + - [$footerIcon](./bdscript/footerIcon.md) + - [$image](./bdscript/image.md) + - [$thumbnail](./bdscript/thumbnail.md) + - [$title](./bdscript/title.md) + - [User]() + - [$authorAvatar](./bdscript/authorAvatar.md) + - [$authorID](./bdscript/authorID.md) + - [$authorOfMessage](./bdscript/authorOfMessage.md) + - [$creationDate](./bdscript/creationDate.md) + - [$discriminator](./bdscript/discriminator.md) + - [$displayName](./bdscript/displayName.md) + - [$displayName[]](./bdscript/displayNameComplex.md) + - [$getUserStatus](./bdscript/getUserStatus.md) + - [$getCustomStatus](./bdscript/getCustomStatus.md) + - [$isAdmin](./bdscript/isAdmin.md) + - [$isBooster](./bdscript/isBooster.md) + - [$isBot](./bdscript/isBot.md) + - [$isUserDMEnabled](./bdscript/isUserDMEnabled.md) + - [$nickname](./bdscript/nickname.md) + - [$nickname[]](./bdscript/nicknameComplex.md) + - [$userAvatar](./bdscript/userAvatar.md) + - [$userBadges](./bdscript/userBadges.md) + - [$userBanner](./bdscript/userBanner.md) + - [$userBannerColor](./bdscript/userBannerColor.md) + - [$userExists](./bdscript/userExists.md) + - [$userID](./bdscript/userID.md) + - [$userInfo](./bdscript/userInfo.md) + - [$userJoined](./bdscript/userJoined.md) + - [$userJoinedDiscord](./bdscript/userJoinedDiscord.md) + - [$username](./bdscript/username.md) + - [$username[]](./bdscript/usernameComplex.md) + - [$userPerms](./bdscript/userPerms.md) + - [$userServerAvatar](./bdscript/userServerAvatar.md) + - [Moderation]() + - [$ban](./bdscript/ban.md) + - [$ban[]](./bdscript/banComplex.md) + - [$banID](./bdscript/banID.md) + - [$banID[]](./bdscript/banIDComplex.md) + - [$clear](./bdscript/clear.md) + - [$clear[]](./bdscript/clearComplex.md) + - [$getBanReason](./bdscript/getBanReason.md) + - [$isBanned](./bdscript/isBanned.md) + - [$isTimedOut](./bdscript/isTimedOut.md) + - [$kick](./bdscript/kick.md) + - [$kick[]](./bdscript/kickComplex.md) + - [$kickMention](./bdscript/kickMention.md) + - [$mute](./bdscript/mute.md) + - [$timeout](./bdscript/timeout.md) + - [$unban](./bdscript/unban.md) + - [$unbanID](./bdscript/unbanID.md) + - [$unbanID[]](./bdscript/unbanIDComplex.md) + - [$unmute](./bdscript/unmute.md) + - [$untimeout](./bdscript/untimeout.md) + - [Channels]() + - [$afkChannelID](./bdscript/afkChannelID.md) + - [$categoryChannels](./bdscript/categoryChannels.md) + - [$categoryCount](./bdscript/categoryCount.md) + - [$categoryCount[]](./bdscript/categoryCountComplex.md) + - [$categoryID](./bdscript/categoryID.md) + - [$channelCount](./bdscript/channelCount.md) + - [$channelExists](./bdscript/channelExists.md) + - [$channelID](./bdscript/channelID.md) + - [$channelID[]](./bdscript/channelIDComplex.md) + - [$channelIDFromName](./bdscript/channelIDFromName.md) + - [$channelName](./bdscript/channelName.md) + - [$channelNames](./bdscript/channelNames.md) + - [$channelPosition](./bdscript/channelPosition.md) + - [$channelPosition[]](./bdscript/channelPositionComplex.md) + - [$channelTopic](./bdscript/channelTopic.md) + - [$channelTopic[]](./bdscript/channelTopicComplex.md) + - [$channelType](./bdscript/channelType.md) + - [$createChannel](./bdscript/createChannel.md) + - [$deleteChannels](./bdscript/deleteChannels.md) + - [$deleteChannelsByName](./bdscript/deleteChannelsByName.md) + - [$dmChannelID](./bdscript/dmChannelID.md) + - [$editChannelPerms](./bdscript/editChannelPerms.md) + - [$findChannel](./bdscript/findChannel.md) + - [$getSlowmode](./bdscript/getSlowmode.md) + - [$isNSFW](./bdscript/isNSFW.md) + - [$closeTicket](./bdscript/closeTicket.md) + - [$isTicket](./bdscript/isTicket.md) + - [$newTicket](./bdscript/newTicket.md) + - [$lastMessageID](./bdscript/lastMessageID.md) + - [$lastPinTimestamp](./bdscript/lastPinTimestamp.md) + - [$modifyChannel](./bdscript/modifyChannel.md) + - [$modifyChannelPerms](./bdscript/modifyChannelPerms.md) + - [$parentID](./bdscript/parentID.md) + - [$parentID[]](./bdscript/parentIDComplex.md) + - [$rulesChannelID](./bdscript/rulesChannelID.md) + - [$serverChannelExists](./bdscript/serverChannelExists.md) + - [$slowmode](./bdscript/slowmode.md) + - [$systemChannelID](./bdscript/systemChannelID.md) + - [$voiceUserLimit](./bdscript/voiceUserLimit.md) + - [Roles]() + - [$allowRoleMentions](./bdscript/allowRoleMentions.md) + - [$colorRole](./bdscript/colorRole.md) + - [$createRole](./bdscript/createRole.md) + - [$deleteRole](./bdscript/deleteRole.md) + - [$findRole](./bdscript/findRole.md) + - [$getRoleColor](./bdscript/getRoleColor.md) + - [$giveRole](./bdscript/giveRole.md) + - [$hasRole](./bdscript/hasRole.md) + - [$highestRole](./bdscript/highestRole.md) + - [$highestRole[]](./bdscript/highestRoleComplex.md) + - [$highestRoleWithPerms](./bdscript/highestRoleWithPerms.md) + - [$isHoisted](./bdscript/isHoisted.md) + - [$isMentionable](./bdscript/isMentionable.md) + - [$lowestRole](./bdscript/lowestRole.md) + - [$lowestRole[]](./bdscript/lowestRoleComplex.md) + - [$lowestRoleWithPerms](./bdscript/lowestRoleWithPerms.md) + - [$mentionedRoles](./bdscript/mentionedRoles.md) + - [$modifyRole](./bdscript/modifyRole.md) + - [$modifyRolePerms](./bdscript/modifyRolePerms.md) + - [$roleCount](./bdscript/roleCount.md) + - [$roleExists](./bdscript/roleExists.md) + - [$roleGrant](./bdscript/roleGrant.md) + - [$roleID](./bdscript/roleID.md) + - [$roleInfo](./bdscript/roleInfo.md) + - [$roleName](./bdscript/roleName.md) + - [$roleNames](./bdscript/roleNames.md) + - [$rolePerms](./bdscript/rolePerms.md) + - [$rolePosition](./bdscript/rolePosition.md) + - [$setUserRoles](./bdscript/setUserRoles.md) + - [$takeRole](./bdscript/takeRole.md) + - [$userRoles](./bdscript/userRoles.md) + - [Bot]() + - [$allMembersCount](./bdscript/allMembersCount.md) + - [$awaitFunc](./bdscript/awaitFunc.md) + - [$botCommands](./bdscript/botCommands.md) + - [$botID](./bdscript/botID.md) + - [$botLeave](./bdscript/botLeave.md) + - [$botLeave[]](./bdscript/botLeaveComplex.md) + - [$botListDescription](./bdscript/botListDescription.md) + - [$botListHide](./bdscript/botListHide.md) + - [$botNode](./bdscript/botNode.md) + - [$botOwnerID](./bdscript/botOwnerID.md) + - [$botTyping](./bdscript/botTyping.md) + - [$commandFolder](./bdscript/commandFolder.md) + - [$commandName](./bdscript/commandName.md) + - [$commandTrigger](./bdscript/commandTrigger.md) + - [$commandsCount](./bdscript/commandsCount.md) + - [$customID](./bdscript/customID.md) + - [$deletecommand](./bdscript/deletecommand.md) + - [$enabled](./bdscript/enabled.md) + - [$getBotInvite](./bdscript/getBotInvite.md) + - [$nodeVersion](./bdscript/nodeVersion.md) + - [$nodeVersion[]](./bdscript/nodeVersionComplex.md) + - [$ping](./bdscript/ping.md) + - [$registerGuildCommands](./bdscript/registerGuildCommands.md) + - [$registerGuildCommands[]](./bdscript/registerGuildCommandsComplex.md) + - [$scriptLanguage](./bdscript/scriptLanguage.md) + - [$shardID](./bdscript/shardID.md) + - [$shardID[]](./bdscript/shardIDComplex.md) + - [$slashCommandsCount](./bdscript/slashCommandsCount.md) + - [$slashID](./bdscript/slashID.md) + - [$slashID[]](./bdscript/slashIDComplex.md) + - [$serverCount](./bdscript/serverCount.md) + - [$serverNames](./bdscript/serverNames.md) + - [$serverNames[]](./bdscript/serverNamesComplex.md) + - [$executionTime](./bdscript/executionTime.md) + - [$unregisterGuildCommands](./bdscript/unregisterGuildCommands.md) + - [$unregisterGuildCommands[]](./bdscript/unregisterGuildCommandsComplex.md) + - [$uptime](./bdscript/uptime.md) + - [$eval](./bdscript/eval.md) + - [Server]() + - [$afkTimeout](./bdscript/afkTimeout.md) + - [$boostCount](./bdscript/boostCount.md) + - [$boostCount[]](./bdscript/boostCountComplex.md) + - [$boostLevel](./bdscript/boostLevel.md) + - [$getServerInvite](./bdscript/getServerInvite.md) + - [$getServerInvite[]](./bdscript/getServerInviteComplex.md) + - [$getInviteInfo](./bdscript/getInviteInfo.md) + - [$guildBanner](./bdscript/guildBanner.md) + - [$guildExists](./bdscript/guildExists.md) + - [$guildID](./bdscript/guildID.md) + - [$guildID[]](./bdscript/guildIDComplex.md) + - [$hypesquad](./bdscript/hypesquad.md) + - [$membersCount](./bdscript/membersCount.md) + - [$membersCount[]](./bdscript/membersCountComplex.md) + - [$serverDescription](./bdscript/serverDescription.md) + - [$serverDescription[]](./bdscript/serverDescriptionComplex.md) + - [$serverEmojis](./bdscript/serverEmojis.md) + - [$serverIcon](./bdscript/serverIcon.md) + - [$serverIcon[]](./bdscript/serverIconComplex.md) + - [$serverInfo](./bdscript/serverInfo.md) + - [$serverName](./bdscript/serverName.md) + - [$serverOwner](./bdscript/serverOwner.md) + - [$serverOwner[]](./bdscript/serverOwnerComplex.md) + - [$serverRegion](./bdscript/serverRegion.md) + - [$serverVerificationLvl](./bdscript/serverVerificationLvl.md) + - [Blacklists]() + - [$blackListIDs](./bdscript/blackListIDs.md) + - [$blackListRoles](./bdscript/blackListRoles.md) + - [$blackListRolesIDs](./bdscript/blackListRolesIDs.md) + - [$blackListServers](./bdscript/blackListServers.md) + - [$blackListUsers](./bdscript/blackListUsers.md) + - [Arguments & Conditions]() + - [$argCount](./bdscript/argCount.md) + - [$argsCheck](./bdscript/argsCheck.md) + - [$and](./bdscript/and.md) + - [$checkCondition](./bdscript/checkCondition.md) + - [$checkContains](./bdscript/checkContains.md) + - [$else](./bdscript/else.md) + - [$elseif](./bdscript/elseif.md) + - [$endif](./bdscript/endif.md) + - [$if](./bdscript/if.md) + - [$isBoolean](./bdscript/isBoolean.md) + - [$isInteger](./bdscript/isInteger.md) + - [$isNumber](./bdscript/isNumber.md) + - [$isSlash](./bdscript/isSlash.md) + - [$isValidHex](./bdscript/isValidHex.md) + - [$or](./bdscript/or.md) + - [Text]() + - [$alternativeParsing](./bdscript/alternativeParsing.md) + - [$byteCount](./bdscript/byteCount.md) + - [$c](./bdscript/c.md) + - [$charCount](./bdscript/charCount.md) + - [$cropText](./bdscript/cropText.md) + - [$disableInnerSpaceRemoval](./bdscript/disableInnerSpaceRemoval.md) + - [$disableSpecialEscaping](./bdscript/disableSpecialEscaping.md) + - [$editSplitText](./bdscript/editSplitText.md) + - [$getTextSplitIndex](./bdscript/getTextSplitIndex.md) + - [$getTextSplitLength](./bdscript/getTextSplitLength.md) + - [$joinSplitText](./bdscript/joinSplitText.md) + - [$mentionedChannels](./bdscript/mentionedChannels.md) + - [$linesCount](./bdscript/linesCount.md) + - [$numberSeparator](./bdscript/numberSeparator.md) + - [$removeContains](./bdscript/removeContains.md) + - [$removeSplitTextElement](./bdscript/removeSplitTextElement.md) + - [$repeatMessage](./bdscript/repeatMessage.md) + - [$replaceText](./bdscript/replaceText.md) + - [$splitText](./bdscript/splitText.md) + - [$textSplit](./bdscript/textSplit.md) + - [$toLowercase](./bdscript/toLowercase.md) + - [$toTitleCase](./bdscript/toTitleCase.md) + - [$toUppercase](./bdscript/toUppercase.md) + - [$trimContent](./bdscript/trimContent.md) + - [$trimSpace](./bdscript/trimSpace.md) + - [$unescape](./bdscript/unescape.md) + - [Mathematics]() + - [$calculate](./bdscript/calculate.md) + - [$ceil](./bdscript/ceil.md) + - [$divide](./bdscript/divide.md) + - [$floor](./bdscript/floor.md) + - [$max](./bdscript/max.md) + - [$min](./bdscript/min.md) + - [$modulo](./bdscript/modulo.md) + - [$multi](./bdscript/multi.md) + - [$round](./bdscript/round.md) + - [$sort](./bdscript/sort.md) + - [$sqrt](./bdscript/sqrt.md) + - [$sub](./bdscript/sub.md) + - [$sum](./bdscript/sum.md) + - [$enableDecimals](./bdscript/enableDecimals.md) + - [Random]() + - [$optOff](./bdscript/optOff.md) + - [$random](./bdscript/random.md) + - [$random[]](./bdscript/randomComplex.md) + - [$randomCategoryID](./bdscript/randomCategoryID.md) + - [$randomChannelID](./bdscript/randomChannelID.md) + - [$randomGuildID](./bdscript/randomGuildID.md) + - [$randomMention](./bdscript/randomMention.md) + - [$randomRoleID](./bdscript/randomRoleID.md) + - [$randomString](./bdscript/randomString.md) + - [$randomText](./bdscript/randomText.md) + - [$randomUser](./bdscript/randomUser.md) + - [$randomUserID](./bdscript/randomUserID.md) + - [Time]() + - [$date](./bdscript/date.md) + - [$day](./bdscript/day.md) + - [$getTimestamp](./bdscript/getTimestamp.md) + - [$getTimestamp[]](./bdscript/getTimestampComplex.md) + - [$hour](./bdscript/hour.md) + - [$hostingExpireTime](./bdscript/hostingExpireTime.md) + - [$hostingExpireTime[]](./bdscript/hostingExpireTimeComplex.md) + - [$messageEditedTimestamp](./bdscript/messageEditedTimestamp.md) + - [$minute](./bdscript/minute.md) + - [$month](./bdscript/month.md) + - [$premiumExpireTime](./bdscript/premiumExpireTime.md) + - [$second](./bdscript/second.md) + - [$time](./bdscript/time.md) + - [$year](./bdscript/year.md) + - [Cooldowns]() + - [$changeCooldownTime](./bdscript/changeCooldownTime.md) + - [$cooldown](./bdscript/cooldown.md) + - [$getCooldown](./bdscript/getCooldown.md) + - [$globalCooldown](./bdscript/globalCooldown.md) + - [$serverCooldown](./bdscript/serverCooldown.md) + - [Message]() + - [$allowMention](./bdscript/allowMention.md) + - [$allowUserMentions](./bdscript/allowUserMentions.md) + - [$channelSendMessage](./bdscript/channelSendMessage.md) + - [$deleteIn](./bdscript/deleteIn.md) + - [$deleteMessage](./bdscript/deleteMessage.md) + - [$dm](./bdscript/dm.md) + - [$dm[]](./bdscript/dmComplex.md) + - [$editEmbedIn](./bdscript/editEmbedIn.md) + - [$editIn](./bdscript/editIn.md) + - [$editMessage](./bdscript/editMessage.md) + - [$ephemeral](./bdscript/ephemeral.md) + - [$isMentioned](./bdscript/isMentioned.md) + - [$mentioned](./bdscript/mentioned.md) + - [$nomention](./bdscript/nomention.md) + - [$getAttachments](./bdscript/getAttachments.md) + - [$getEmbedData](./bdscript/getEmbedData.md) + - [$getMessage](./bdscript/getMessage.md) + - [$isMessageEdited](./bdscript/isMessageEdited.md) + - [$ignoreLinks](./bdscript/ignoreLinks.md) + - [$message](./bdscript/message.md) + - [$message[]](./bdscript/messageComplex.md) + - [$messageID](./bdscript/messageID.md) + - [$pinMessage](./bdscript/pinMessage.md) + - [$pinMessage[]](./bdscript/pinMessageComplex.md) + - [$publishMessage](./bdscript/publishMessage.md) + - [$reply](./bdscript/reply.md) + - [$reply[]](./bdscript/replyComplex.md) + - [$replyIn](./bdscript/replyIn.md) + - [$repliedMessageID](./bdscript/repliedMessageID.md) + - [$repliedMessageID[]](./bdscript/repliedMessageIDComplex.md) + - [$removeLinks](./bdscript/removeLinks.md) + - [$removeLinks[]](./bdscript/removeLinksComplex.md) + - [$noMentionMessage](./bdscript/noMentionMessage.md) + - [$noMentionMessage[]](./bdscript/noMentionMessageComplex.md) + - [$sendEmbedMessage](./bdscript/sendEmbedMessage.md) + - [$sendMessage](./bdscript/sendMessage.md) + - [$unpinMessage](./bdscript/unpinMessage.md) + - [$useChannel](./bdscript/useChannel.md) + - [$tts](./bdscript/tts.md) + - [$url](./bdscript/url.md) + - [Variables]() + - [$getChannelVar](./bdscript/getChannelVar.md) + - [$getLeaderboardPosition](./bdscript/getLeaderboardPosition.md) + - [$getLeaderboardValue](./bdscript/getLeaderboardValue.md) + - [$getServerVar](./bdscript/getServerVar.md) + - [$getUserVar](./bdscript/getUserVar.md) + - [$getVar](./bdscript/getVar.md) + - [$globalUserLeaderboard](./bdscript/globalUserLeaderboard.md) + - [$resetChannelVar](./bdscript/resetChannelVar.md) + - [$resetServerVar](./bdscript/resetServerVar.md) + - [$resetUserVar](./bdscript/resetUserVar.md) + - [$serverLeaderboard](./bdscript/serverLeaderboard.md) + - [$setChannelVar](./bdscript/setChannelVar.md) + - [$setServerVar](./bdscript/setServerVar.md) + - [$setUserVar](./bdscript/setUserVar.md) + - [$setVar](./bdscript/setVar.md) + - [$userLeaderboard](./bdscript/userLeaderboard.md) + - [$var](./bdscript/var.md) + - [$varExistError](./bdscript/varExistError.md) + - [$varExists](./bdscript/varExists.md) + - [$variablesCount](./bdscript/variablesCount.md) + - [Threads]() + - [$editThread](./bdscript/editThread.md) + - [$startThread](./bdscript/startThread.md) + - [$threadAddMember](./bdscript/threadAddMember.md) + - [$threadMessageCount](./bdscript/threadMessageCount.md) + - [$threadRemoveMember](./bdscript/threadRemoveMember.md) + - [$threadUserCount](./bdscript/threadUserCount.md) + - [Emojis & Reactions]() + - [$addCmdReactions](./bdscript/addCmdReactions.md) + - [$addMessageReactions](./bdscript/addMessageReactions.md) + - [$addReactions](./bdscript/addReactions.md) + - [$clearReactions](./bdscript/clearReactions.md) + - [$getReactions](./bdscript/getReactions.md) + - [$userReacted](./bdscript/userReacted.md) + - [$addEmoji](./bdscript/addEmoji.md) + - [$customEmoji](./bdscript/customEmoji.md) + - [$emoteCount](./bdscript/emoteCount.md) + - [$emojiExists](./bdscript/emojiExists.md) + - [$emojiName](./bdscript/emojiName.md) + - [$isEmojiAnimated](./bdscript/isEmojiAnimated.md) + - [$removeEmoji](./bdscript/removeEmoji.md) + - [Webhooks]() + - [$webhookAvatarURL](./bdscript/webhookAvatarURL.md) + - [$webhookColor](./bdscript/webhookColor.md) + - [$webhookCreate](./bdscript/webhookCreate.md) + - [$webhookDelete](./bdscript/webhookDelete.md) + - [$webhookDescription](./bdscript/webhookDescription.md) + - [$webhookFooter](./bdscript/webhookFooter.md) + - [$webhookSend](./bdscript/webhookSend.md) + - [$webhookTitle](./bdscript/webhookTitle.md) + - [$webhookUsername](./bdscript/webhookUsername.md) + - [Error Handling]() + - [$catch](./bdscript/catch.md) + - [$endtry](./bdscript/endtry.md) + - [$error](./bdscript/error.md) + - [$suppressErrors](./bdscript/suppressErrors.md) + - [$suppressErrors[]](./bdscript/suppressErrorsComplex.md) + - [$try](./bdscript/try.md) + - [$stop](./bdscript/stop.md) + - [$embedSuppressErrors](./bdscript/embedSuppressErrors.md) + - [Permissions]() + - [$checkUserPerms](./bdscript/checkUserPerms.md) + - [$ignoreChannels](./bdscript/ignoreChannels.md) + - [$onlyAdmin](./bdscript/onlyAdmin.md) + - [$onlyBotChannelPerms](./bdscript/onlyBotChannelPerms.md) + - [$onlyBotPerms](./bdscript/onlyBotPerms.md) + - [$onlyForCategories](./bdscript/onlyForCategories.md) + - [$onlyForChannels](./bdscript/onlyForChannels.md) + - [$onlyForIDs](./bdscript/onlyForIDs.md) + - [$onlyForRoles](./bdscript/onlyForRoles.md) + - [$onlyForRoleIDs](./bdscript/onlyForRoleIDs.md) + - [$onlyForServers](./bdscript/onlyForServers.md) + - [$onlyForUsers](./bdscript/onlyForUsers.md) + - [$onlyIf](./bdscript/onlyIf.md) + - [$onlyIfMessageContains](./bdscript/onlyIfMessageContains.md) + - [$onlyNSFW](./bdscript/onlyNSFW.md) + - [$onlyPerms](./bdscript/onlyPerms.md) - [Callbacks]() - [Introduction](./callbacks/introduction.md) diff --git a/src/bdscript/addCmdReactions.md b/src/bdscript/addCmdReactions.md index 1b5d15b5caa..944ff3b71c9 100644 --- a/src/bdscript/addCmdReactions.md +++ b/src/bdscript/addCmdReactions.md @@ -35,8 +35,10 @@ $addCmdReactions[$message] ``` ### How to get emoji ID? - -> This method requires [Developer Mode](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-) to be enabled! + +```admonish warning +This method requires [Developer Mode](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-) to be enabled! +``` 1. Type `\:TheEmojiName:` 2. Send the message. diff --git a/src/bdscript/addContainer.md b/src/bdscript/addContainer.md new file mode 100644 index 00000000000..f82acdd8d72 --- /dev/null +++ b/src/bdscript/addContainer.md @@ -0,0 +1,64 @@ +# $addContainer +
+ Components v2 +
+ +Adds a container body to the message. + +## Syntax +``` +$addContainer[Container name;(Color hex;Spoiler?)] +``` + +```admonish warning title="Limit" +A message can have a maximum of 20 container bodies (40 container components). +``` + +```admonish fail title="It's important!" +The container body must contain [container components](#container-components), otherwise the function will not work! +``` + +### Parameters +- `Container name` `(Type: String || Flag: Required)`: Name for attaching other container components to the container body. +```admonish warning +You can't have multiple containers and [sections](./addSection.md) **with the same name** in one message. So for example, you can’t have two containers with the name set to `Container1`. +``` + +- `Color hex` `(Type: Color || Flag: Vacantable)`: The [color hex](../tools/color.md) to set the container border color as. You can also use color integer number. +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to select the best color! +``` + +- `Spoiler?` `(Type: Bool || Flag: Optional)`: Will the container have a spoiler effect? + +## Container Components +- [`$addTextDisplay[]`](./addTextDisplay.md) +- [`$addSeparator[]`](./addSeparator.md) + +## Example +``` +$nomention +$addContainer[Container1;#673ab7;false] +$addTextDisplay[Hello world!;Container1] +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: + embed: + description: Hello world! + color: "#673ab7" +``` + +```admonish question title="What is this?" +How [`$addTextDisplay[]`](./addTextDisplay.md) works? +``` diff --git a/src/bdscript/addMessageReactions.md b/src/bdscript/addMessageReactions.md index 6c186108435..242a414fec8 100644 --- a/src/bdscript/addMessageReactions.md +++ b/src/bdscript/addMessageReactions.md @@ -29,8 +29,10 @@ Successfully added the reactions to the message. ![example1](https://user-images.githubusercontent.com/111157596/249183563-89753bae-aa63-4f42-8172-30975f468189.gif) ## How to get emoji ID? - -> This method requires [Developer Mode](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-) to be enabled! + +```admonish warning +This method requires [Developer Mode](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-) to be enabled! +``` 1. Type `\:TheEmojiName:` 2. Send the message. diff --git a/src/bdscript/addReactions.md b/src/bdscript/addReactions.md index 0576d24687f..1cba989c867 100644 --- a/src/bdscript/addReactions.md +++ b/src/bdscript/addReactions.md @@ -46,8 +46,10 @@ $addReactions[✅;:x:] ``` \ ### How to get emoji ID? - -> This method requires [Developer Mode](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-) to be enabled! + +```admonish warning +This method requires [Developer Mode](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-) to be enabled! +``` 1. Type `\:TheEmojiName:` 2. Send the message. diff --git a/src/bdscript/addSection.md b/src/bdscript/addSection.md new file mode 100644 index 00000000000..e1d36aafa60 --- /dev/null +++ b/src/bdscript/addSection.md @@ -0,0 +1,43 @@ +# $addSection +
+ Components v2 +
+ +Adds a section to the message. + +## Syntax +``` +$addSection[Section name;(Container name)] +``` + +```admonish fail title="It's important!" +The section must contain all [section components](#section-components), otherwise the function will not work! +``` + +### Parameters +- `Section name` `(Type: String || Flag: Required)`: Name for attaching other section components to the section. +```admonish warning +You can't have multiple sections and [containers](./addContainer.md) **with the same name** in one message. So for example, you can’t have two sections with the name set to `section`. +``` + +- `Container name` `(Type: String || Flag: Optional)`: To which [container body](./addContainer.md) should the section be attached. + +## Section Components +```admonish warning title="Limit" +Only 3 components can be added to the section. +``` + +- [`$addTextDisplay[]`](./addTextDisplay.md) +- [`$addThumbnail[]`](./addThumbnail.md) + +## Example +``` +$nomention +$addSection[section] +$addTextDisplay[Hello world!;section] +$addThumbnail[$authorAvatar;;;section] +``` + +```admonish question title="What is this?" +How [`$addTextDisplay[]`](./addTextDisplay.md), [`$addThumbnail[]`](./addThumbnail.md) and [`$authorAvatar`](./authorAvatar.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/addSelectMenuOption.md b/src/bdscript/addSelectMenuOption.md index 5a432212587..f7fad9b2833 100644 --- a/src/bdscript/addSelectMenuOption.md +++ b/src/bdscript/addSelectMenuOption.md @@ -3,11 +3,11 @@ Adds a new select menu option to an existing select menu. ## Syntax ``` -$addSelectMenuOption[Menu option ID;Label;Value;Description;(Default?;Emoji;Message ID)] +$addSelectMenuOption[Menu ID;Label;Value;Description;(Default?;Emoji;Message ID)] ``` ### Parameters -- `Menu option ID` `(Type: String || Flag: Required)`: The ID used in [`$newSelectMenu[]`](./newSelectMenu.md). +- `Menu ID` `(Type: String || Flag: Required)`: The ID used in [`$newSelectMenu[]`](./newSelectMenu.md). - `Label` `(Type: String || Flag: Required)`: The name of the option. - `Value` `(Type: String || Flag: Required)`: It's the data that gets passed to the `$onInteraction[]` callback. **The value has to be unique in the select menu!** - `Description` `(Type: String || Flag: Emptiable)`: A text which shows up under the `Label`. diff --git a/src/bdscript/addSeparator.md b/src/bdscript/addSeparator.md new file mode 100644 index 00000000000..81eaeef9867 --- /dev/null +++ b/src/bdscript/addSeparator.md @@ -0,0 +1,38 @@ +# $addSeparator +
+ Components v2 +
+ +Adds a separator component to [the container body](./addContainer.md) or message. + +## Syntax +``` +$addSeparator[(Divider?;Spacing type;Container name)] +``` + +```admonish warning title="Limit" +This function counts as a container component. A message can have a maximum of 40 components. +``` + +### Parameters +- `Divider?` `(Type: Bool || Flag: Vacantable)`: Should the message show a visual divider? +- `Spacing type` `(Type: Enum || Flag: Vacantable)`: Type of the divider. [Possible types](#spacing-types). +- `Container name` `(Type: String || Flag: Optional)`: The name of [the container body](./addContainer.md) to which the component will be attached. If nothing is specified, it will be attached to the message. + +### Spacing Types +- `small` +- `large` + +## Example +``` +$nomention +$addTextDisplay[Hello world!] +$addSeparator[] +$addTextDisplay[I love BDFD] +$addSeparator[false] +$addTextDisplay[Components v2] +``` + +```admonish question title="What is this?" +How [`$addTextDisplay[]`](./addTextDisplay.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/addTextDisplay.md b/src/bdscript/addTextDisplay.md new file mode 100644 index 00000000000..c1821bb0b42 --- /dev/null +++ b/src/bdscript/addTextDisplay.md @@ -0,0 +1,53 @@ +# $addTextDisplay +
+ Components v2 +
+ +Adds a text display component. + +## Syntax +``` +$addTextDisplay[Content;(Container/Section name)] +``` + +```admonish warning title="Limit" +This function counts as a component. A message can have a maximum of 40 components. [One section](./addSection.md) can have only 3 components. +``` + +### Parameters +- `Content` `(Type: String || Flag: Required)`: The text that will be displayed. The total number of characters in the message, [section](./addSection.md) and [container bodies](./addContainer.md) cannot exceed 4000 characters. +```admonish info +Supports discord highlighting. +``` + +- `Container/Section name` `(Type: String || Flag: Optional)`: The name of the [container body](./addContainer.md) or [section](./addSection) to which the component will be attached. If nothing is specified, it will be attached to the message. + +## Example +``` +$nomention +$addTextDisplay[Simple text] +$addContainer[Container1;#673ab7;false] +$addTextDisplay[Hello world!;Container1] +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Simple text + embed: + description: Hello world! + color: "#673ab7" +``` + +```admonish question title="What is this?" +How [`$addContainer[]`](./addContainer.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/addThumbnail.md b/src/bdscript/addThumbnail.md new file mode 100644 index 00000000000..c19819aa271 --- /dev/null +++ b/src/bdscript/addThumbnail.md @@ -0,0 +1,34 @@ +# $addThumbnail +
+ Components v2 +
+ +Adds a thumbnail component to [the section](./addSection.md). + +## Syntax +``` +$addThumbnail[Image URL;Image description;Spoiler?;Section name] +``` + +```admonish warning title="Limit" +This function counts as a component. A message can have a maximum of 40 components. +You can't add more than 3 components to [a section](./addSection.md). +``` + +### Parameters +- `Image URL` `(Type: URL || Flag: Required)`: URL of the thumbnail image. +- `Image description` `(Type: String || Flag: Emptiable)`: Alt text description for the image. +- `Spoiler?` `(Type: Bool || Flag: Emptiable)`: Will the image have a spoiler effect? +- `Section name` `(Type: String || Flag: Required)`: The name of [the section](./addSection.md) to which the component will be attached. + +## Example +``` +$nomention +$addSection[Section] +$addTextDisplay[Hello world!;Section] +$addThumbnail[$authorAvatar;My avatar;;Section] +``` + +```admonish question title="What is this?" +How [`$addSection[]`](./addSection.md), [`$authorAvatar`](./authorAvatar.md) and [`$addTextDisplay[]`](./addTextDisplay.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/allowMention.md b/src/bdscript/allowMention.md index ceb451eabf9..4c330b2cdc0 100644 --- a/src/bdscript/allowMention.md +++ b/src/bdscript/allowMention.md @@ -27,6 +27,8 @@ $message content: | <@RainbowKey> ``` + +~~~admonish example - Without `$allowMention`: @@ -44,6 +46,8 @@ $message content: | @RainbowKey ``` + +~~~ ```admonish question title="What is this?" How [`$message`](./message.md) works? diff --git a/src/bdscript/allowUserMentions.md b/src/bdscript/allowUserMentions.md index 870c48a7c97..52fa3919f93 100644 --- a/src/bdscript/allowUserMentions.md +++ b/src/bdscript/allowUserMentions.md @@ -13,7 +13,7 @@ $allowUserMentions[User IDs;...] ``` $nomention $allowUserMentions[] -Hi <@696368083517964288>! I mentioned you, but you didn't get pinged. +Hi <@390515191819010058>! I mentioned you, but you didn't get pinged. ``` ``` discord yaml @@ -28,5 +28,10 @@ Hi <@696368083517964288>! I mentioned you, but you didn't get pinged. bot: true verified: true content: | - Hi <@Spen>! I mentioned you, but you didn't get pinged. + Hi <@Kuba>! I mentioned you, but you didn't get pinged. +- user_id: 390515191819010058 + username: kubastick + color: "#FF0000" + content: | + Wow really! No notification 😎 ``` diff --git a/src/bdscript/alternativeParsing.md b/src/bdscript/alternativeParsing.md index c99e82a0274..eb9dd2bd664 100644 --- a/src/bdscript/alternativeParsing.md +++ b/src/bdscript/alternativeParsing.md @@ -16,8 +16,11 @@ Changes the way how triggers are read. ## Syntax ``` $alternativeParsing -``` -> This function was added at the end of 2019 as an experiment, and it can be unstable and break your commands. You should not use `$alternativeParsing` when making your bot. +``` + +```admonish fail +This function was added at the end of 2019 as an experiment, and it can be unstable and break your commands. You should not use `$alternativeParsing` when making your bot. +``` ## Example 1. Create two commands and set the trigger `hello` for one command and `helloworld` for the other. @@ -35,69 +38,68 @@ $alternativeParsing $description["helloworld"] ``` 3. Execute commands. - ``` discord yaml - - user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - hello - - - user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true - verified: true - content: - embed: - description: "\"hello\"" - - - user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - helloworld +``` discord yaml +- user_id: 729343563401265193 + username: Nicky + color: "#EE7908" + content: | + hello +- user_id: 566613317972394004 + username: Wiki Bot + color: "#748BD4" + bot: true + verified: true + content: + embed: + description: "\"hello\"" +- user_id: 729343563401265193 + username: Nicky + color: "#EE7908" + content: | + helloworld - - user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true - verified: true - content: - embed: - description: "\"helloworld\"" - ``` +- user_id: 566613317972394004 + username: Wiki Bot + color: "#748BD4" + bot: true + verified: true + content: + embed: + description: "\"helloworld\"" +``` + +~~~admonish example - - Without `$alternativeParsing`: +- Without `$alternativeParsing`: - ``` discord yaml - - user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - hello - - - user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true - verified: true - content: - embed: - description: "\"hello\"" - - - user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - helloworld - - - user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true - verified: true - content: - embeds: - - description: "\"helloworld\"" - - description: "\"hello\"" - ``` +``` discord yaml +- user_id: 729343563401265193 + username: Nicky + color: "#EE7908" + content: | + hello +- user_id: 566613317972394004 + username: Wiki Bot + color: "#748BD4" + bot: true + verified: true + content: + embed: + description: "\"hello\"" +- user_id: 729343563401265193 + username: Nicky + color: "#EE7908" + content: | + helloworld +- user_id: 566613317972394004 + username: Wiki Bot + color: "#748BD4" + bot: true + verified: true + content: + embeds: + - description: "\"helloworld\"" + - description: "\"hello\"" +``` + +~~~ \ No newline at end of file diff --git a/src/bdscript/argsCheck.md b/src/bdscript/argsCheck.md index 038bb8644f2..8745bcb57f8 100644 --- a/src/bdscript/argsCheck.md +++ b/src/bdscript/argsCheck.md @@ -8,7 +8,11 @@ $argsCheck[How many?;Error message] ### Parameters - `How many?` `(Type: HowMany || Flag: Required)`: How many arguments there should be in the user’s message. - > 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`. + +```admonish tip +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` `(Type: String || Flag: Emptiable)`: The message that the bot will send if the user has too many/few arguments. ## Example diff --git a/src/bdscript/authorAvatar.md b/src/bdscript/authorAvatar.md index c478dd50971..d55ec293223 100644 --- a/src/bdscript/authorAvatar.md +++ b/src/bdscript/authorAvatar.md @@ -26,8 +26,12 @@ $image[$authorAvatar] embed: image: https://user-images.githubusercontent.com/111157596/257052136-4b8d5715-b381-4d5f-8c46-8ae0be53c8d8.png ``` + +```admonish question title="What is this?" +How [`$image[]`](./image.md) works? +``` ```admonish tip title="Image size" -You can use `?size=size` at the end of the banner URL to increase/decrease the image size. Example sizes: 1024, 2048, 4096. +You can use `?size=size` at the end of the avatar URL to increase/decrease the image size. Example sizes: 1024, 2048, 4096. (e.g. `$image[$authorAvatar?size=4096]`) ``` diff --git a/src/bdscript/authorID.md b/src/bdscript/authorID.md index b03dd99518f..c5d8f9bd11f 100644 --- a/src/bdscript/authorID.md +++ b/src/bdscript/authorID.md @@ -13,19 +13,19 @@ This command was executed by <@$authorID>! ``` ``` discord yaml -- user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - !example -- user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true verified: true highlight: true content: | - This command was executed by <@Nicky>! + This command was executed by <@RainbowKey>! ``` ```admonish note diff --git a/src/bdscript/authorOfMessage.md b/src/bdscript/authorOfMessage.md index d329659be3f..050d2ecbbdc 100644 --- a/src/bdscript/authorOfMessage.md +++ b/src/bdscript/authorOfMessage.md @@ -15,7 +15,7 @@ $authorOfMessage[Channel ID;Message ID] ## Example ``` $nomention -Author of message: $username[$authorOfMessage[$message[1];$message[2]]] +Author of message: $displayName[$authorOfMessage[$message[1];$message[2]]] ``` ``` discord yaml @@ -39,5 +39,5 @@ Author of message: $username[$authorOfMessage[$message[1];$message[2]]] ``` ```admonish question title="What is this?" -How [`$username`](./username.md) and [`$message[]`](./messageComplex.md) works? +How [`$displayName[]`](./displayNameComplex.md) and [`$message[]`](./messageComplex.md) works? ``` diff --git a/src/bdscript/awaitFunc.md b/src/bdscript/awaitFunc.md index acc2762861d..9ee3ca26592 100644 --- a/src/bdscript/awaitFunc.md +++ b/src/bdscript/awaitFunc.md @@ -31,18 +31,6 @@ $awaitFunc[say] verified: true content: | What do you want me to say? -- user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - I love BDFD! -- user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true - verified: true - content: | - I love BDFD! ``` ```admonish info title="Read more" diff --git a/src/bdscript/blackListServers.md b/src/bdscript/blackListServers.md index 4262f5e62f5..70527ec0ea4 100644 --- a/src/bdscript/blackListServers.md +++ b/src/bdscript/blackListServers.md @@ -7,8 +7,8 @@ Blocks certain servers from using the command. } .discord-messages > .discord-message:first-of-type:before { - color: var(--color1); - background: var(--color3); + color: var(--link-color); + background: var(--card-bg); border-radius: 10px; padding-left: 1rem; padding-right: 1rem; @@ -60,9 +60,10 @@ Pong! $ping ms color: "#E67E22" content: | !example -- username: BDFD Support - color: "#378afa" - bot: true +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | ❌ You can't use this command! @@ -86,5 +87,5 @@ Pong! $ping ms ``` ```admonish question title="What is this?" -How [`$ping`](./ping.md) works? +How [`$ping`](./ping.md) and [`$guildID`](./guildID.md) works? ``` diff --git a/src/bdscript/botCommands.md b/src/bdscript/botCommands.md index 3c3cda6fc9e..bb6dfc65848 100644 --- a/src/bdscript/botCommands.md +++ b/src/bdscript/botCommands.md @@ -27,5 +27,5 @@ $botCommands[🔹] bot: true verified: true content: | - !help🔹!server🔹!bdfd + !help🔹!server🔹!bdfd🔹!example ``` diff --git a/src/bdscript/botLeave.md b/src/bdscript/botLeave.md index e015b9752f1..fac7399169b 100644 --- a/src/bdscript/botLeave.md +++ b/src/bdscript/botLeave.md @@ -11,25 +11,44 @@ $botLeave $nomention $sendMessage[I left this server!] $botLeave -``` +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#ffffff" + bot: true + verified: true + content: | + I left this server! +``` +\ ![example](https://user-images.githubusercontent.com/113303649/210329580-8237da8e-762c-422f-9408-f0e734a21657.png) ```admonish question title="What is this?" How [`$sendMessage[]`](./sendMessage.md) works? ``` + +~~~admonish warning +If you are using **[BDScript 2](../guides/general/bds2/aboutBDScript2.md)**, put `$botLeave` at the very bottom of the code so that the code works correctly i.e: -> If you are using **BDScript 2**, put `$botLeave` at the very bottom of the code so that the code works correctly i.e: -> -> ❌ Not correct: -> ``` -> $botLeave -> $nomention -> $sendMessage[I left this server!] -> ``` -> -> ✅ Correct: -> ``` -> $nomention -> $sendMessage[I left this server!] -> $botLeave -> ``` +❌ Not correct: +``` +$botLeave +$nomention +$sendMessage[I left this server!] +``` + +✅ Correct: +``` +$nomention +$sendMessage[I left this server!] +$botLeave +``` + +~~~ diff --git a/src/bdscript/botLeaveComplex.md b/src/bdscript/botLeaveComplex.md index a943cbbe2d2..22237b3ab59 100644 --- a/src/bdscript/botLeaveComplex.md +++ b/src/bdscript/botLeaveComplex.md @@ -12,14 +12,10 @@ $botLeave[Guild ID] ## Example ``` $nomention -$sendMessage[I left out `$serverName[$message]` server.] +I left out `$serverName[$message]` server. $botLeave[$message] ``` -```admonish question title="What is this?" -How [`$sendMessage[]`](./sendMessage.md), [`$serverName[]`](./serverName.md) and [`$message`](./message.md) works? -``` - ```discord yaml - user_id: 803569638084313098 username: RainbowKey @@ -36,19 +32,26 @@ How [`$sendMessage[]`](./sendMessage.md), [`$serverName[]`](./serverName.md) and ``` \ ![example](https://user-images.githubusercontent.com/113303649/210337078-dbdb0539-6f4a-4271-8574-afc43551d0e8.png) + +```admonish question title="What is this?" +How [`$serverName[]`](./serverName.md) and [`$message`](./message.md) works? +``` + +~~~admonish warning +If you are using **[BDScript 2](../guides/general/bds2/aboutBDScript2.md)**, put `$botLeave[]` at the very bottom of the code so that the code works correctly i.e: -> If you are using **BDScript 2**, put `$botLeave[]` at the very bottom of the code so that the code works correctly i.e: -> -> ❌ Not correct: -> ``` -> $botLeave[$message] -> $nomention -> $sendMessage[I left this server!] -> ``` -> -> ✅ Correct: -> ``` -> $nomention -> $sendMessage[I left this server!] -> $botLeave[$message] -> ``` +❌ Not correct: +``` +$botLeave[$message] +$nomention +$sendMessage[I left this server!] +``` + +✅ Correct: +``` +$nomention +$sendMessage[I left this server!] +$botLeave[$message] +``` + +~~~ \ No newline at end of file diff --git a/src/bdscript/botListHide.md b/src/bdscript/botListHide.md index 384503328c4..bc11b78bb58 100644 --- a/src/bdscript/botListHide.md +++ b/src/bdscript/botListHide.md @@ -4,8 +4,11 @@ Hides this command from being shown on the BDL command list (if the bot is on [* ## Syntax ``` $botListHide -``` -> This function does not hide the command for [`$botCommands[]`](./botCommands.md). +``` + +```admonish warning +This function does not hide the command for [`$botCommands[]`](./botCommands.md). +``` ## Example 1. Create two commands and set the trigger `!ping` for one command and `!secret` for the other. @@ -25,9 +28,34 @@ $botListHide $botListDescription[Ping? Pong!] ``` 3. Execute commands - - ![example](https://user-images.githubusercontent.com/113303649/210347402-7b36f8f4-fc8f-4804-9310-1ed2de0392dc.png) - + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !secret +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + This is a secret command! 🤫 +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !ping +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Pong! +``` + ### With `$botListHide` ![example](https://user-images.githubusercontent.com/113303649/210349185-677b00f3-df10-4443-a9b5-25ec9c2c2e29.png) diff --git a/src/bdscript/botNode.md b/src/bdscript/botNode.md index 5d07baa2887..a817f3b0659 100644 --- a/src/bdscript/botNode.md +++ b/src/bdscript/botNode.md @@ -4,8 +4,11 @@ Returns the bot's node ID. ## Syntax ``` $botNode -``` -> See list of Nodes and Status, [Click here](https://botdesignerdiscord.com/status). +``` + +```admonish note +See list of Nodes and Status, [Click here](https://botdesignerdiscord.com/status). +``` ## Example ``` diff --git a/src/bdscript/botOwnerID.md b/src/bdscript/botOwnerID.md index 9b06de8a77c..7e4b0f3ea66 100644 --- a/src/bdscript/botOwnerID.md +++ b/src/bdscript/botOwnerID.md @@ -1,5 +1,9 @@ # $botOwnerID Returns the bot owner's ID. + +```admonish warning +Only works if you logged into the app via your Discord account. Otherwise, if you log in via your Google/Apple account or other methods, it will return ``. +``` ## Syntax ``` diff --git a/src/bdscript/botTyping.md b/src/bdscript/botTyping.md index 2a194361bfd..6d085d8bd00 100644 --- a/src/bdscript/botTyping.md +++ b/src/bdscript/botTyping.md @@ -24,7 +24,7 @@ Using `$botTyping` will add a 2-3 second delay before your bot’s response, sim ``` $nomention $botTyping -Hello $username! +Hello world! ``` ``` discord yaml @@ -49,5 +49,5 @@ Hello $username! bot: true verified: true content: | - Hello RainbowKey! + Hello world! ``` diff --git a/src/bdscript/c.md b/src/bdscript/c.md index 7dc60872006..faa4600763b 100644 --- a/src/bdscript/c.md +++ b/src/bdscript/c.md @@ -21,7 +21,7 @@ $c[This is a say command. You are reading a comment!] username: Nicky color: "#EE7908" content: | - !say As you can see, the comment doesn't appear! Pretty cool; right? + !example As you can see, the comment doesn't appear! Pretty cool; right? - user_id: 566613317972394004 username: Wiki Bot color: "#748BD4" @@ -29,8 +29,8 @@ $c[This is a say command. You are reading a comment!] verified: true content: | As you can see, the comment doesn't appear! Pretty cool; right? -``` - -```admonish question title="What is this?" -How [`$message`](./message.md) works? +``` + +```admonish question title="What is this?" +How [`$message`](./message.md) works? ``` diff --git a/src/bdscript/categoryChannels.md b/src/bdscript/categoryChannels.md index 819321d861a..e2303d48d86 100644 --- a/src/bdscript/categoryChannels.md +++ b/src/bdscript/categoryChannels.md @@ -16,38 +16,39 @@ $categoryChannels[Category ID;Separator;(Option)] - `id` - The IDs of the channels. - `mention` - The mentions of the channels. - `count` - The amount of channels in the category. - -> The `count` option does not list anything, instead it will return the number of channels under the given category. + +```admonish note +The `count` option does not list anything, instead it will return the number of channels under the given category. +``` ## Example ``` $nomention -Total $categoryChannels[$categoryID[BDFD];;count] channels! -$categoryChannels[$categoryID[BDFD]; +Total $categoryChannels[$parentID;;count] channels! +$categoryChannels[$parentID; ;mention] ``` ``` discord yaml -- user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - !example - -- user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true verified: true content: | Total 5 channels! <#rules> - <#news> + <#example> <#update-logs> <#main-chat> <#secret-channel> ``` ```admonish question title="What is this?" -How [`$categoryID[]`](./categoryID.md) works? +How [`$parentID`](./parentID.md) works? ``` diff --git a/src/bdscript/categoryCount.md b/src/bdscript/categoryCount.md index 8f503572a10..24e05dda571 100644 --- a/src/bdscript/categoryCount.md +++ b/src/bdscript/categoryCount.md @@ -9,18 +9,18 @@ $categoryCount ``` $nomention There are $categoryCount categories in this server! -``` -``` discord yaml -- user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - !categories +``` -- user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true verified: true content: | There are 3 categories in this server! diff --git a/src/bdscript/categoryCountComplex.md b/src/bdscript/categoryCountComplex.md index 5a70157e341..ec61f2ddd70 100644 --- a/src/bdscript/categoryCountComplex.md +++ b/src/bdscript/categoryCountComplex.md @@ -16,15 +16,15 @@ There are $categoryCount[$message] categories in the server! ``` ``` discord yaml -- user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - !categories 790676954247725106 -- user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true verified: true content: | There are 5 categories in the server! diff --git a/src/bdscript/categoryID.md b/src/bdscript/categoryID.md index b6456210c01..32f69cddf5f 100644 --- a/src/bdscript/categoryID.md +++ b/src/bdscript/categoryID.md @@ -20,15 +20,15 @@ Category ID: $categoryID[$message] ``` ``` discord yaml -- user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - !categoryID Information -- user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true verified: true content: | Category ID: 790620501927526462 diff --git a/src/bdscript/changeUsernameWithID.md b/src/bdscript/changeUsernameWithID.md index 1c9765dfd0b..fb5ee1fd36c 100644 --- a/src/bdscript/changeUsernameWithID.md +++ b/src/bdscript/changeUsernameWithID.md @@ -13,8 +13,8 @@ $changeUsernameWithID[User ID;New nickname] ## Example ``` $nomention -$addCmdReactions[❤️] -$changeUsernameWithID[$message[1];$message[2]] +Successfuly changed! +$changeUsernameWithID[$botID;$message] ``` ``` discord yaml @@ -22,13 +22,16 @@ $changeUsernameWithID[$message[1];$message[2]] username: RainbowKey color: "#E67E22" content: | - !example 154148273307910144 Owner - reactions: - - emoji: https://upload.wikimedia.org/wikipedia/commons/7/70/Symbolic_Love_Heart.png - count: 1 - reacted: false + !example The best bot +- user_id: 1009018156494368798 + username: The best bot + color: "#378afa" + bot: true + verified: true + content: | + Successfuly changed! ``` ```admonish question title="What is this?" -How [`$addCmdReactions[]`](./addCmdReactions.md) and [`$message[]`](./messageComplex.md) works? +How [`$botID`](./botID.md) and [`$message`](./message.md) works? ``` diff --git a/src/bdscript/channelCount.md b/src/bdscript/channelCount.md index e852fecb94a..94b26e25879 100644 --- a/src/bdscript/channelCount.md +++ b/src/bdscript/channelCount.md @@ -1,11 +1,15 @@ # $channelCount Returns the amount of channels in the current server. - ## Syntax ``` $channelCount -``` +``` + +```admonish info +It's the sum of the number of categories, channels, and active forum posts (threads). +``` + ## Example ``` $nomention @@ -24,5 +28,33 @@ There are $channelCount channels in this server! bot: true verified: true content: | - There are 19 channels in this server! -``` + There are 34 channels in this server! +``` + +~~~admonish tip + +To avoid counting categories, you can use [`$categoryCount`](./categoryCount.md): + +``` +$nomention +There are $sub[$channelCount;$categoryCount] channels in this server! +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + There are 21 channels in this server! +``` + +> How [`$sub[]`](./sub.md) and [`$categoryCount`](./categoryCount.md) works? + +~~~ diff --git a/src/bdscript/channelID.md b/src/bdscript/channelID.md index ddf06a43b4c..6f86ab83a38 100644 --- a/src/bdscript/channelID.md +++ b/src/bdscript/channelID.md @@ -26,9 +26,8 @@ Channel ID: $channelID Channel ID: 566370477967147018 ``` -```admonish note +~~~admonish note It will return `none` if you use it in a DM: -``` ```discord yaml - user_id: 803569638084313098 @@ -41,5 +40,7 @@ It will return `none` if you use it in a DM: verified: true content: | Channel ID: none -``` +``` + +~~~ diff --git a/src/bdscript/channelIDComplex.md b/src/bdscript/channelIDComplex.md index b36c17d246d..9c51619ce78 100644 --- a/src/bdscript/channelIDComplex.md +++ b/src/bdscript/channelIDComplex.md @@ -30,9 +30,8 @@ Channel ID: $channelID[$message] Channel ID: 566370477967147018 ``` -```admonish note +~~~admonish note It supports category names: -``` ``` discord yaml - user_id: 803569638084313098 @@ -48,6 +47,8 @@ It supports category names: content: | Channel ID: 1009019011545178132 ``` + +~~~ ```admonish question title="What is this?" How [`$message`](./message.md) works? diff --git a/src/bdscript/channelNames.md b/src/bdscript/channelNames.md index 475ad5968cc..a283ca1e492 100644 --- a/src/bdscript/channelNames.md +++ b/src/bdscript/channelNames.md @@ -4,16 +4,23 @@ List all channel names separated by a given separator. ## Syntax ``` $channelNames[Separator;(Guild ID)] -``` +``` + +```admonish note +It can return names of the `category`, `channel`, `forum` channel types. +``` + ### Parameters - `Seperator` `(Type: String || Flag: Emptiable)`: The separator used to separate the channel names. - `Guild ID` `(Type: Snowflake || Flag: Optional)`: The guild for which to return the channel names. _(Defaults to the current guild)_ + ## Example ``` $nomention #$channelNames[ #] -``` +``` + ``` discord yaml - user_id: 803569638084313098 username: RainbowKey @@ -30,7 +37,4 @@ $nomention #media #suggestions #Category -``` - -> It can return names of the `category`, `channel`, `forum`. - +``` \ No newline at end of file diff --git a/src/bdscript/channelSendMessage.md b/src/bdscript/channelSendMessage.md index 9e2b3efabb6..cc3abfcd159 100644 --- a/src/bdscript/channelSendMessage.md +++ b/src/bdscript/channelSendMessage.md @@ -7,8 +7,8 @@ Sends a message in the provided channel. } .discord-messages > .discord-message:before { - color: var(--color1); - background: var(--color3); + color: var(--link-color); + background: var(--card-bg); border-radius: 10px; padding-left: 1rem; padding-right: 1rem; @@ -59,9 +59,10 @@ $channelSendMessage[$mentionedChannels[1];Hello!] ``` ``` discord yaml -- username: BDFD Support - color: "#378afa" - bot: true +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | Hello! diff --git a/src/bdscript/channelTopic.md b/src/bdscript/channelTopic.md index 1149897ad19..f0cbcfcd080 100644 --- a/src/bdscript/channelTopic.md +++ b/src/bdscript/channelTopic.md @@ -9,23 +9,20 @@ $channelTopic ## Example ``` $nomention -<#$channelID>'s channel topic is: $channelTopic -``` +Topic of this channel is: $channelTopic +``` + ``` discord yaml -- user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - !example -- user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | - <#testing>'s channel topic is: A testing channel! -``` - -```admonish question title="What is this?" -How [`$channelID`](./channelID.md) works? + Topic of this channel is: A testing channel! ``` diff --git a/src/bdscript/channelTopicComplex.md b/src/bdscript/channelTopicComplex.md index a92371dcde5..f17ff99a9f2 100644 --- a/src/bdscript/channelTopicComplex.md +++ b/src/bdscript/channelTopicComplex.md @@ -9,26 +9,44 @@ $channelTopic[Channel ID] ### Parameters - `Channel ID` `(Type: Snowflake || Flag: Required)`: The channel to return its topic. -## Example -``` -$nomention -<#$noMentionMessage>'s channel topic is: $channelTopic[$noMentionMessage] -``` -``` discord yaml -- user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - !example 860870690323300359 -- user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true - verified: true - content: | - <#demo>'s channel topic is: Demos, examples and more! -``` - -```admonish question title="What is this?" -How [`$noMentionMessage`](./noMentionMessage.md) works? -``` +## Example +``` +$nomention +Channel Topic: $channelTopic[$mentionedChannels[1]] +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example <#media> +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Channel Topic: Post cat pictures here! +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example <#secret> +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Channel Topic: +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + ⬆️ Returns empty value if no description. +``` + +```admonish question title="What is this?" +How [`$mentionedChannels[]`](./mentionedChannels.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/channelType.md b/src/bdscript/channelType.md index 32910e5c4bd..7461930214b 100644 --- a/src/bdscript/channelType.md +++ b/src/bdscript/channelType.md @@ -5,34 +5,59 @@ Returns the type of a channel. ``` $channelType[Channel ID] ``` - -> The different channel types that the bot will return are: `text`, `voice`, `category`, `thread`, `dm`, `stage`, `announcement` and `forum`. + +```admonish note +The different channel types that the bot will return are: `text`, `voice`, `category`, `thread`, `dm`, `stage`, `announcement` and `forum`. +``` ### Parameters - `Channel ID` `(Type: Snowflake || Flag: Required)`: The channel which type will be returned. - ## Example ``` $nomention -$channelType[$channelID] +$channelType[$mentionedChannels[1]] ``` -``` discord yaml -- user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - !example -- user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true - verified: true - content: | - text -``` - -```admonish question title="What is this?" -How [`$channelID`](./channelID.md) works? -``` +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example <#main-chat> +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + text +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example <#Events> +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + stage +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example <#disco> +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + voice +``` + +```admonish question title="What is this?" +How [`$mentionedChannels[]`](./mentionedChannels.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/checkCondition.md b/src/bdscript/checkCondition.md index 9be23442c0a..5204ef37064 100644 --- a/src/bdscript/checkCondition.md +++ b/src/bdscript/checkCondition.md @@ -34,9 +34,10 @@ $checkCondition[$message==hello] color: "#E67E22" content: | !example BDFD -- username: BDFD Support - color: "#378afa" - bot: true +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | false @@ -45,9 +46,10 @@ $checkCondition[$message==hello] color: "#E67E22" content: | !example hello -- username: BDFD Support - color: "#378afa" - bot: true +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | true diff --git a/src/bdscript/checkContains.md b/src/bdscript/checkContains.md index 9138f6b1911..3b4b95c7e3c 100644 --- a/src/bdscript/checkContains.md +++ b/src/bdscript/checkContains.md @@ -22,9 +22,10 @@ $checkContains[$message;hi;hello] color: "#E67E22" content: | !example bye -- username: BDFD Support - color: "#378afa" - bot: true +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | false @@ -33,9 +34,10 @@ $checkContains[$message;hi;hello] color: "#E67E22" content: | !example hello -- username: BDFD Support - color: "#378afa" - bot: true +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | true @@ -44,9 +46,10 @@ $checkContains[$message;hi;hello] color: "#E67E22" content: | !example hi bye -- username: BDFD Support - color: "#378afa" - bot: true +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | true diff --git a/src/bdscript/checkUserPerms.md b/src/bdscript/checkUserPerms.md index d38aaab3370..3df28267d2a 100644 --- a/src/bdscript/checkUserPerms.md +++ b/src/bdscript/checkUserPerms.md @@ -13,8 +13,7 @@ $checkUserPerms[User ID;Permissions] ## Example ``` $nomention -$onlyIf[$checkUserPerms[$authorID;admin]==false;You can't use this command, because you are an administrator.] -You aren't an admin! +Admin perms?: $checkUserPerms[$authorID;admin] ``` ``` discord yaml @@ -23,13 +22,30 @@ You aren't an admin! color: "#EE7908" content: | !example -- user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | - You can't use this command, because you are an administrator. + Admin perms?: false +- user_id: 1262009115689881702 + username: GettingBeatenByKito + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Admin perms?: true +- user_id: 1262009115689881702 + username: GettingBeatenByKito + color: "#E67E22" + content: | + Yay! I have admin perms😎 ``` ```admonish question title="What is this?" diff --git a/src/bdscript/clear.md b/src/bdscript/clear.md index 686ec4b23cc..8746c761bfd 100644 --- a/src/bdscript/clear.md +++ b/src/bdscript/clear.md @@ -1,14 +1,18 @@ # $clear Deletes a certain amount of messages. - -> When using just `$clear`, the author's message must include a number. + +```admonish tip +When using just `$clear`, the author's message must include a number. +``` ## Syntax ``` $clear ``` - -> Discord doesn't allow deleting messages in bulk which are over 2 weeks old. + +```admonish warning +Discord doesn't allow deleting messages in bulk which are over 2 weeks old. +``` ### Permissions Required permissions that the bot must have for this function to work properly: diff --git a/src/bdscript/clearComplex.md b/src/bdscript/clearComplex.md index 2c04ac07437..bd22854a8bb 100644 --- a/src/bdscript/clearComplex.md +++ b/src/bdscript/clearComplex.md @@ -10,8 +10,10 @@ $clear[Amount;(User ID;Remove pinned messages?)] - `Amount` `(Type: Integer || Flag: Required)`: The amount of messages to delete. (maximal 100) - `User ID` `(Type: Snowflake || Flag: Vacantable)`: If a user ID is provided, the bot will only delete messages from that user. - `Remove pinned messages?` `(Type: Bool || Flag: Optional)`: Decides whether to delete pinned messages or not. The default is `yes`. - -> Discord doesn't allow deleting messages in bulk which are over 2 weeks old. + +```admonish warning +Discord doesn't allow deleting messages in bulk which are over 2 weeks old. +``` ### Permissions Required permissions that the bot must have for this function to work properly: diff --git a/src/bdscript/color.md b/src/bdscript/color.md index 31cf38cd1ef..eb6fee8cc59 100644 --- a/src/bdscript/color.md +++ b/src/bdscript/color.md @@ -7,8 +7,12 @@ $color[Color hex;(Index)] ``` ### Parameters -- `Color hex` `(Type: Color || Flag: Emptiable)`: The [color hex](https://htmlcolorcodes.com/color-picker) to set the embed border color as. You can also use color integer number. -- `Index` `(Type: Integer || Flag: Optional)`: What embed the color border should belong to (Optional). The default is `1`. [(learn more)](../resources/embedIndexes.md) +- `Color hex` `(Type: Color || Flag: Emptiable)`: The [color hex](../tools/color.md) to set the embed border color as. You can also use color integer number. +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to select the best color! +``` + +- `Index` `(Type: Integer || Flag: Optional)`: What embed the color border should belong to. The default is `1`. [(learn more)](../resources/embedIndexes.md) ## Example ``` @@ -16,20 +20,25 @@ $nomention $description[⬅️ That is the embed color border!] $color[#673ab7] ``` -``` discord yaml -- user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - !example - -- user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: embed: description: ⬅️ That is the embed color border! color: "#673ab7" ``` + + +```admonish question title="What is this?" +How [`$description[]`](./description.md) works? +``` diff --git a/src/bdscript/colorRole.md b/src/bdscript/colorRole.md index 5636dcea8b7..e2e535865be 100644 --- a/src/bdscript/colorRole.md +++ b/src/bdscript/colorRole.md @@ -7,7 +7,10 @@ $colorRole[Color hex] ``` ### Parameters -- `Color hex` `(Type: Color || Flag: Required)`: The [color hex](https://htmlcolorcodes.com/color-picker) to change the mentioned role color to. +- `Color hex` `(Type: Color || Flag: Required)`: The [color hex](../tools/color.md) to change the mentioned role color to. You can also use color integer number. +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to select the best color! +``` ## Example ``` @@ -34,3 +37,8 @@ $colorRole[$noMentionMessage] ``` \ ![example](https://user-images.githubusercontent.com/111157596/257056832-3040aa89-91ea-428e-b362-3ed075cf620e.png) + +```admonish question title="What is this?" +How [`$noMentionMessage`](./noMentionMessage.md) and [`$mentionedRoles[]`](./mentionedRoles.md) works? +``` + diff --git a/src/bdscript/commandName.md b/src/bdscript/commandName.md index 32fb75d2dfe..0ea23ca099d 100644 --- a/src/bdscript/commandName.md +++ b/src/bdscript/commandName.md @@ -24,5 +24,5 @@ Commmand name: $commandName bot: true verified: true content: | - Commmand name: example + Commmand name: !example ``` diff --git a/src/bdscript/commandsCount.md b/src/bdscript/commandsCount.md index fcf0926b710..79a7d1a8d4f 100644 --- a/src/bdscript/commandsCount.md +++ b/src/bdscript/commandsCount.md @@ -17,7 +17,7 @@ I have $commandsCount commands! username: RainbowKey color: "#E67E22" content: | - !example Hello world! + !example - username: BDFD Support user_id: 1009018156494368798 color: "#378afa" diff --git a/src/bdscript/cooldown.md b/src/bdscript/cooldown.md index 3dec94239a4..4f8f100eed8 100644 --- a/src/bdscript/cooldown.md +++ b/src/bdscript/cooldown.md @@ -18,8 +18,10 @@ Day | d | 69922554 Hour | h | 1678141301 Minute | m | 100688478068 Second | s | 6041308684139 - -> `%time%` returns how much time is left on the cooldown. + +```admonish tip +`%time%` returns how much time is left on the cooldown. +``` ## Example ``` @@ -54,30 +56,26 @@ Hi! content: | Please wait 27 Seconds, then use that command again! ``` -\ + +~~~admonish warning +If you are using **BDScript 2**, then all functions above `$cooldown[]` will always work. -> If you are using **BDScript 2**, then all functions above `$cooldown[]` will always work. -> -> ❌ Not correct: -> ``` -> $nomention -> $setUserVar[Money;$sum[$getUserVar[Money];5]] -> $sendMessage[You worked successfully and earned 5 🪙] -> $cooldown[30s;Please wait %time%, then use !work command again!] -> ``` -> Your bot will always add 5🪙 to "Money" variable. -> -> ✅ Correct: -> ``` -> $nomention -> $cooldown[30s;Please wait %time%, then use !work command again!] -> $setUserVar[Money;$sum[$getUserVar[Money];5]] -> $sendMessage[You worked successfully and earned 5 🪙] -> ``` -> How [`$setUserVar[]`](./findUser.md) and [`$sendMessage[]`](./sendMessage.md) works? +❌ Not correct: +``` +$nomention +$setUserVar[Money;$sum[$getUserVar[Money];5]] +$sendMessage[You worked successfully and earned 5 🪙] +$cooldown[30s;Please wait %time%, then use !work command again!] +``` +Your bot will always add 5🪙 to "Money" variable. -### Recommendation -You can also use these functions: -- [`$getCooldown[]`](./getCooldown.md) -- [`$serverCooldown[]`](./serverCooldown.md) -- [`$globalCooldown[]`](./globalCooldown.md) +✅ Correct: +``` +$nomention +$cooldown[30s;Please wait %time%, then use !work command again!] +$setUserVar[Money;$sum[$getUserVar[Money];5]] +$sendMessage[You worked successfully and earned 5 🪙] +``` +How [`$setUserVar[]`](./findUser.md), [`$sum[]`](/sum.md) and [`$sendMessage[]`](./sendMessage.md) works? + +~~~ diff --git a/src/bdscript/createChannel.md b/src/bdscript/createChannel.md index 2f8befdd0b2..9e31f7640f4 100644 --- a/src/bdscript/createChannel.md +++ b/src/bdscript/createChannel.md @@ -4,12 +4,19 @@ Creates a new channel. ## Syntax ``` $createChannel[Name;Type;(Category ID)] -``` -> Discord allows users to create up to 500 channels per server. This includes all channel types. +``` + +```admonish warning title="Limit" +Discord allows users to create up to 500 channels per server. This includes all channel types. +``` ### Parameters - `Name` `(Type: String || Flag: Required)`: The name of the new channel. - > Channel names can have a maximum of 100 characters. + +```admonish warning title="Limit" +Channel names can have a maximum of 100 characters. +``` + - `Type` `(Type: Enum || Flag: Required)`: The channel type. Channel types: - `category` - `text` @@ -43,5 +50,32 @@ New channel created! \ ![example](https://user-images.githubusercontent.com/69215413/125972524-95307b17-bfcc-4525-a4fa-1d58a30a1fa9.png) + +~~~admonish tip +You can use [`$channelID[]`](./channelIDComplex.md) to return the channel ID. + +``` +$nomention +$createChannel[main-chat;text] +New channel created! ID: $channelID[main-chat] +``` + +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + New channel created! ID: 566370477967147018 +``` + +> How [`$channelID[]`](./channelIDComplex.md) works? + +~~~ -> [You can use `$channelID[]` to return the channel ID.](./authorIDComplex.md) diff --git a/src/bdscript/createRole.md b/src/bdscript/createRole.md index 4f45960106d..67e6aa35949 100644 --- a/src/bdscript/createRole.md +++ b/src/bdscript/createRole.md @@ -3,17 +3,27 @@ Creates a new role. ## Syntax ``` -$createRole[Role name;Color;(Display Role;Mentionable)] +$createRole[Role name;Color hex;(Display role?;Mentionable?)] +``` + +```admonish warning title="Limit" +Discord allows users to create up to 250 roles per server. ``` -> Discord allows users to create up to 250 roles per server. ### Parameters - `Role name` `(Type: String || Flag: Required)`: The name to give the new role. -> Role names can have a maximum of 100 characters. -- `Color` `(Type: Color || Flag: Required)`: The [color hex](https://htmlcolorcodes.com/color-picker) of the new role. -- `Display Role` `(Type: Bool || Flag: Vacantable)`: Whether the role should be displayed separately (hoisted) or not. `no` means the role won't be hoisted, `yes` means it will.\ +```admonish warning title="Limit" +Role names can have a maximum of 100 characters. +``` + +- `Color hex` `(Type: Color || Flag: Required)`: The [color hex](../tools/color.md) of the new role. You can also use color integer number. +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to select the best color! +``` + +- `Display role?` `(Type: Bool || Flag: Vacantable)`: Whether the role should be displayed separately (hoisted) or not. `no` means the role won't be hoisted, `yes` means it will.\ ![example](https://user-images.githubusercontent.com/69215413/122795705-965e9480-d28b-11eb-8e4e-98338f143ecb.png) -- `Mentionable` `(Type: Bool || Flag: Vacantable)`: Whether the role should be mentionable by everyone. `no` means the role won't be mentionable, `yes` means it will.\ +- `Mentionable?` `(Type: Bool || Flag: Vacantable)`: Whether the role should be mentionable by everyone. `no` means the role won't be mentionable, `yes` means it will.\ ![example](https://user-images.githubusercontent.com/69215413/122795765-a37b8380-d28b-11eb-8f06-c23e01bafc11.png) ## Example @@ -23,7 +33,7 @@ $createRole[Cool Role;#FFFF00;yes;no] New role created! ``` -``` discord yaml +```discord yaml - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" @@ -40,5 +50,28 @@ New role created! \ ![example](https://user-images.githubusercontent.com/69215413/125973030-7c9b980c-cffb-4f8e-aacc-a644a6fa23c3.png) -> [You can use `$roleID[]` to return the role ID.](./roleID.md) +~~~admonish tip +You can use [`$roleID[]`](./roleID.md) to return the role ID. + +``` +$nomention +$createRole[Staff;#FFFF00;no;no] +New role created! ID: $roleID[Staff] +``` + +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + New role created! ID: 659789148806447134 +``` +~~~ diff --git a/src/bdscript/creationDate.md b/src/bdscript/creationDate.md index 43094e85e43..87a0cb86c0a 100644 --- a/src/bdscript/creationDate.md +++ b/src/bdscript/creationDate.md @@ -5,8 +5,10 @@ Returns the creation date of any valid Discord Snowflake ID. ``` $creationDate[ID;(Format)] ``` - -> Uses GoLang date format + +```admonish info +Uses GoLang date format. +``` ### Parameters - `ID` `(Type: Snowflake || Flag: Required)`: The ID from which to get the creation date. The ID can be a `User ID`, a `Role ID`, a `Message ID`, a `Emoji ID`, or a `Guild ID`. @@ -15,13 +17,12 @@ $creationDate[ID;(Format)] > Click [me](../resources/timeFormat.md) to check all supported time format values. ## Example -- Default format - ``` - $nomention - $creationDate[$authorID] - ``` +``` +$nomention +$creationDate[$authorID] +``` -``` discord yaml +```discord yaml - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" @@ -35,15 +36,17 @@ $creationDate[ID;(Format)] content: | 2021-01-26 ``` -\ + +~~~admonish example + +Example with custom format: -- Custom format - ``` - $nomention - $creationDate[$authorID;January 2, 2006 at 3:04 PM (MST -07:00)] - ``` +``` +$nomention +$creationDate[$authorID;January 2, 2006 at 3:04 PM (MST -07:00)] +``` -``` discord yaml +```discord yaml - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" @@ -57,6 +60,8 @@ $creationDate[ID;(Format)] content: | January 26, 2021 at 10:18 AM (UTC +00:00) ``` + +~~~ ```admonish question title="What is this?" How [`$authorID`](./authorID.md) works? diff --git a/src/bdscript/day.md b/src/bdscript/day.md index e43e1f13a80..67df695b085 100644 --- a/src/bdscript/day.md +++ b/src/bdscript/day.md @@ -12,16 +12,17 @@ $nomention Current Day: $day ``` -``` discord yaml -- user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - !example -- user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true content: |
``` diff --git a/src/bdscript/description.md b/src/bdscript/description.md index 6c2e4046ff3..f69df58d2f9 100644 --- a/src/bdscript/description.md +++ b/src/bdscript/description.md @@ -3,12 +3,12 @@ Adds a description to an embed. ## Syntax ``` -$description[message;(index)] +$description[Message;(Index)] ``` ### Parameters -- `message` `(Type: String || Flag: Emptiable)`: The text to set the description as. It cannot exceed more than 4096 characters. -- `index` `(Type: Integer || Flag: Optional)`: What embed the description should belong to. The default is `1`. [(learn more)](../resources/embedIndexes.md) +- `Message` `(Type: String || Flag: Emptiable)`: The text to set the description as. It cannot exceed more than 4096 characters. +- `Index` `(Type: Integer || Flag: Optional)`: What embed the description should belong to. The default is `1`. [(learn more)](../resources/embedIndexes.md) ## Example ``` @@ -16,7 +16,7 @@ $nomention $description[This is a description!] ``` -``` discord yaml +```discord yaml - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" diff --git a/src/bdscript/disableInnerSpaceRemoval.md b/src/bdscript/disableInnerSpaceRemoval.md index 72be1b44d2a..cffeef81c6d 100644 --- a/src/bdscript/disableInnerSpaceRemoval.md +++ b/src/bdscript/disableInnerSpaceRemoval.md @@ -27,10 +27,12 @@ Hello $displayName! content: | Hello RainbowKey! ``` + +~~~admonish example - Without `$disableInnerSpaceRemoval`: -``` discord yaml +```discord yaml - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" @@ -43,7 +45,9 @@ Hello $displayName! verified: true content: | HelloㅤㅤㅤㅤRainbowKey! - ``` +``` + +~~~ ```admonish question title="What is this?" How [`$displayName`](./displayName.md) works? diff --git a/src/bdscript/disableSpecialEscaping.md b/src/bdscript/disableSpecialEscaping.md index 4eed3e98a01..ede57629849 100644 --- a/src/bdscript/disableSpecialEscaping.md +++ b/src/bdscript/disableSpecialEscaping.md @@ -29,3 +29,7 @@ $disableSpecialEscaping content: | Hello Planet! ``` + +```admonish question title="What is this?" +How [`$replaceText[]`](./replaceTText.md) works? +``` diff --git a/src/bdscript/discriminator.md b/src/bdscript/discriminator.md index 8c8ede991f8..5b33e7849e7 100644 --- a/src/bdscript/discriminator.md +++ b/src/bdscript/discriminator.md @@ -31,11 +31,29 @@ Discriminator: #$discriminator[$mentioned[1]] bot: true verified: true content: | - Discriminator: #7678 -``` + Discriminator: #7678 +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + highlight: true + content: | + !example <@RainbowKey> +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Discriminator: #0000 +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + Returned 0000 because it only works for bot IDs. +``` ```admonish note -You can use `$discriminator[]` get the discriminator of the author. +You can use `$discriminator[]` to get the discriminator of the author. ``` ```admonish question title="What is this?" diff --git a/src/bdscript/divide.md b/src/bdscript/divide.md index 3b468a335b6..9357479aae9 100644 --- a/src/bdscript/divide.md +++ b/src/bdscript/divide.md @@ -3,7 +3,7 @@ Divides the provided numbers. ## Syntax ``` -$divide[Numbers] +$divide[Numbers;...] ``` ### Parameters diff --git a/src/bdscript/dm.md b/src/bdscript/dm.md index 9cd8b7ac420..f0bb8c66aa4 100644 --- a/src/bdscript/dm.md +++ b/src/bdscript/dm.md @@ -7,8 +7,8 @@ Direct messages the user who runs the command. } .discord-messages > .discord-message:before { - color: var(--color1); - background: var(--color3); + color: var(--link-color); + background: var(--card-bg); border-radius: 10px; padding-left: 1rem; padding-right: 1rem; diff --git a/src/bdscript/dmChannelID.md b/src/bdscript/dmChannelID.md index 61c1ba42f87..2cfec8643a3 100644 --- a/src/bdscript/dmChannelID.md +++ b/src/bdscript/dmChannelID.md @@ -15,14 +15,15 @@ ID: $dmChannelID[$authorID] ``` ``` discord yaml -- user_id: 803569638084313098 - username: RainbowKey - color: "#E67E22" - content: | - !example -- username: BDFD Support - color: "#378afa" - bot: true +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | ID: 1011919618610311189 diff --git a/src/bdscript/editEmbedIn.md b/src/bdscript/editEmbedIn.md index 1969ef73f2f..023852694c0 100644 --- a/src/bdscript/editEmbedIn.md +++ b/src/bdscript/editEmbedIn.md @@ -3,7 +3,7 @@ Edits the bot's message after the given time, as an embed. ## Syntax ``` -$editEmbedIn[Time;(Title;Description;Footer;Color)] +$editEmbedIn[Time;(Title;Description;Footer;Color hex)] ``` > 📝 Optional fields can be left empty. At least one embed field (`Title`, `Description`, or `Footer`) needs to be inputted. @@ -13,7 +13,10 @@ $editEmbedIn[Time;(Title;Description;Footer;Color)] - `Title` `(Type: String || Flag: Vacantable)`: The new embed title. Optional. - `Description` `(Type: String || Flag: Vacantable)`: The new embed description. Optional. - `Footer` `(Type: String || Flag: Vacantable)`: The new embed footer. Optional. -- `Color` `(Type: Color || Flag: Vacantable)`: The embed border color, must be a valid [color hex](https://htmlcolorcodes.com/color-picker) or color integer number. Use `0` for the default color. Optional. +- `Color hex` `(Type: Color || Flag: Vacantable)`: The embed border color, must be a valid [color hex](../tools/color.md). You can also use color integer number. +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to select the best color! +``` ## Example ``` @@ -32,3 +35,4 @@ $editEmbedIn[5s;Epic Title;This is the edited description!;;#E46AFC] **After** ![example2](https://user-images.githubusercontent.com/69215413/123012680-b7f57400-d390-11eb-866c-6f0aa0fdf9f7.png) + diff --git a/src/bdscript/editMessage.md b/src/bdscript/editMessage.md index 112a5eac8a7..c751b5976b5 100644 --- a/src/bdscript/editMessage.md +++ b/src/bdscript/editMessage.md @@ -3,7 +3,7 @@ Edits one of the bot's messages. ## Syntax ``` -$editMessage[Channel ID;Message ID;Content;(Title;Description;Color;Footer)] +$editMessage[Channel ID;Message ID;Content;(Title;Description;Color hex;Footer)] ``` > [How Do I Get The Channel / Message ID? (click-me)](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID) @@ -13,7 +13,11 @@ $editMessage[Channel ID;Message ID;Content;(Title;Description;Color;Footer)] - `Content` `(Type: String || Flag: Emptiable)`: The new message contents. - `Title` `(Type: String || Flag: Vacantable)`: The new embed title. - `Description` `(Type: String || Flag: Vacantable)`: The new embed description. -- `Color` `(Type: Color || Flag: Vacantable)`: The new embed color border hex. +- `Color hex` `(Type: Color || Flag: Vacantable)`: The new embed [color border hex](../tools/color.md). You can also use color integer number. +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to select the best color! +``` + - `Footer` `(Type: String || Flag: Vacantable)`: The new embed footer text. ## Example @@ -30,3 +34,4 @@ $editMessage[853070225398693898;857040509549281292;This message has been edited! **After** ![example2](https://user-images.githubusercontent.com/69215413/125876457-cf834ed3-f57c-41f3-b862-20433ec21b83.png) + diff --git a/src/bdscript/elseif.md b/src/bdscript/elseif.md index 5d57fd047c1..9bc3cdca8e4 100644 --- a/src/bdscript/elseif.md +++ b/src/bdscript/elseif.md @@ -1,7 +1,9 @@ # $elseif Checks provided condition only if previous `$if[]` or `$elseif[]` conditions returned false. If the provided condition is true, the following block of code will be executed. -> Only for **BDScript 2**! +```admonish danger title="BDScript 2" +Can only be used in **[BDScript 2](../guides/general/bds2/aboutBDScript2.md)**. +``` ## Syntax ``` @@ -42,9 +44,10 @@ $endif color: "#E67E22" content: | !example -- username: BDFD Support - color: "#378afa" - bot: true +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | Developer @@ -53,9 +56,10 @@ $endif color: "#FF0000" content: | !example -- username: BDFD Support - color: "#378afa" - bot: true +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | Server Owner diff --git a/src/bdscript/embedSuppressErrors.md b/src/bdscript/embedSuppressErrors.md index 9eae3ce12b6..9742ff485e9 100644 --- a/src/bdscript/embedSuppressErrors.md +++ b/src/bdscript/embedSuppressErrors.md @@ -3,7 +3,7 @@ Suppresses the error messages, responds with the embed if there is an error. ## Syntax ``` -$embedSuppressErrors[Title;Description;(Color;Author;Footer;Footer icon)] +$embedSuppressErrors[Title;Description;(Color hex;Author;Footer;Footer icon)] ``` > All fields are optional, leave the field empty to not include it. At least one field needs to be inputted, however. @@ -11,7 +11,11 @@ $embedSuppressErrors[Title;Description;(Color;Author;Footer;Footer icon)] ### Parameters - `Title` `(Type: String || Flag: Emptiable)`: The title of the embed. - `Description` `(Type: String || Flag: Emptiable)`: The embed description. -- `Color` `(Type: Color || Flag: Vacantable)`: The embed border color, must be a valid [color hex](https://htmlcolorcodes.com/color-picker). +- `Color hex` `(Type: Color || Flag: Vacantable)`: The embed border color, must be a valid [color hex](../tools/color.md). You can also use color integer number. +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to select the best color! +``` + - `Author` `(Type: String || Flag: Vacantable)`: The embed author text. - `Footer` `(Type: String || Flag: Vacantable)`: The embed footer text. - `Footer icon` `(Type: URL || Flag: Vacantable)`: The embed footer icon, must be a valid image URL. @@ -36,3 +40,4 @@ $argsCheck[>1;You must type at least one word] You typed "$message" ``` ![example_2](https://github.com/caramellya-mei/bdfd-wiki/assets/115384748/f8bb4e3b-e87e-4d9e-83ce-f480363ea924) + diff --git a/src/bdscript/embeddedURL.md b/src/bdscript/embeddedURL.md index ea78e227926..0d7c1713cbe 100644 --- a/src/bdscript/embeddedURL.md +++ b/src/bdscript/embeddedURL.md @@ -39,3 +39,7 @@ $footer[⬆️ Title hyperlink] footer: text: ⬆️ Title hyperlink ``` + +```admonish question title="What is this?" +How [`$title[]`](./title.md) and [`$footer[]`](./footer.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/emoteCount.md b/src/bdscript/emoteCount.md index 9eed3a67304..d67f32074da 100644 --- a/src/bdscript/emoteCount.md +++ b/src/bdscript/emoteCount.md @@ -1,5 +1,5 @@ # $emoteCount -Returns the number of emojis in the current server. +Returns the number of emojis (static and animated) in the current server. ## Syntax ``` @@ -24,5 +24,9 @@ There are $emoteCount emojis in $serverName[$guildID]! bot: true verified: true content: | - There are 26 emojis in Bot Designer for Discord Official Server! + There are 149 emojis in Bot Designer for Discord Official Server! +``` + +```admonish question title="What is this?" +How [`$serverName[]`](./serverName.md) and [`$guildID`](./guildID.md) works? ``` diff --git a/src/bdscript/enableDecimals.md b/src/bdscript/enableDecimals.md index d49268fc0c8..d16d6a4e888 100644 --- a/src/bdscript/enableDecimals.md +++ b/src/bdscript/enableDecimals.md @@ -12,9 +12,10 @@ You can use [`$round[]`](./round.md), [`$ceil[]`](./ceil.md), [`$floor[]`](./flo ### Parameters - `Enable?` `(Type: Bool || Flag: Required)`: Whether to enable decimals in math functions or not, `yes` means it's enabled and `no` means it's disabled. - -### 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. + +```admonish example title="Explaination" +By default, decimals in math or random functions (e.g [`$sum[]`](./sum.md), [`$multi[]`](./multi.md), [`$random`](./random.md), etc) are disabled. The only use for this function is to enable decimals, if you want decimals enabled for math functions in that command. +``` ## Example ``` @@ -37,6 +38,8 @@ Result: $random[1;5] content: | Result: 3.381 ``` + +~~~admonish example - Without `$enableDecimals[]` (or result with `$enableDecimals[no]`): @@ -54,6 +57,8 @@ Result: $random[1;5] content: | Result: 3 ``` + +~~~ ```admonish question title="What is this?" How [`$random[]`](./randomComplex.md) works? diff --git a/src/bdscript/ephemeral.md b/src/bdscript/ephemeral.md index a75f12370e3..ed8de4d8b52 100644 --- a/src/bdscript/ephemeral.md +++ b/src/bdscript/ephemeral.md @@ -32,6 +32,8 @@ Hello! content: | Hello! ``` + +~~~admonish example - Without `$ephemeral`: @@ -49,3 +51,5 @@ Hello! content: | Hello! ``` + +~~~ \ No newline at end of file diff --git a/src/bdscript/eval.md b/src/bdscript/eval.md index e58e49183bd..6020e2d1baf 100644 --- a/src/bdscript/eval.md +++ b/src/bdscript/eval.md @@ -8,9 +8,10 @@ Evaluates the provided BDScript code. ```admonish danger title="BDScript 2" Can only be used in **[BDScript 2](../guides/general/bds2/aboutBDScript2.md)**. ``` - -> ⚠️ **Should be used with caution!** ⚠️ - + +```admonish danger +⚠️ **Should be used with caution!** ⚠️ +``` ## Syntax ``` @@ -40,16 +41,22 @@ $eval[$message] content: | Hello! My username is Nicky ``` + +```admonish question title="What is this?" +How [`$message`](./message.md) works? +``` + +~~~admonish danger +⚠️ **Should be used with caution!** ⚠️ -> How [`$message`](./message.md) works? - -> ⚠️ **Should be used with caution!** ⚠️ -> -> It is recommended to restrict the command to be only used by the bot developers, this can be done with: +It is recommended to restrict the command to be only used by the bot developers, this can be done with: + ``` $nomention $onlyForIDs[$botOwnerID;❌ You are not my owner!] $eval[$message] ``` -> How [`$onlyForIDs[]`](./onlyForIDs.md) and [`$botOwnerID`](./botOwnerID.md) works? +How [`$onlyForIDs[]`](./onlyForIDs.md) and [`$botOwnerID`](./botOwnerID.md) works? + +~~~ diff --git a/src/bdscript/findChannel.md b/src/bdscript/findChannel.md index cd11044a088..5fce42540cd 100644 --- a/src/bdscript/findChannel.md +++ b/src/bdscript/findChannel.md @@ -1,7 +1,9 @@ # $findChannel Finds a channel's ID from the given channel name, ID, or mention. - -> This function can only find channels of **the current** server. + +```admonish warning +This function can only find channels of **the current** server. +``` ## Syntax ``` diff --git a/src/bdscript/footer.md b/src/bdscript/footer.md index adddfd30012..e8a84217792 100644 --- a/src/bdscript/footer.md +++ b/src/bdscript/footer.md @@ -16,7 +16,7 @@ $nomention $footer[Hello! I'm footer👋] ``` -``` discord yaml +```discord yaml - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" diff --git a/src/bdscript/footerIcon.md b/src/bdscript/footerIcon.md index 5a3e02481df..c3a0528035e 100644 --- a/src/bdscript/footerIcon.md +++ b/src/bdscript/footerIcon.md @@ -38,3 +38,7 @@ $footerIcon[$authorAvatar] text: ⬅️ That is the footer icon. This is the footer text. image: https://user-images.githubusercontent.com/111157596/257052136-4b8d5715-b381-4d5f-8c46-8ae0be53c8d8.png ``` + +```admonish question title="What is this?" +How [`$footer[]`](./footer.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/getChannelVar.md b/src/bdscript/getChannelVar.md index 4bf0832f755..7c032782447 100644 --- a/src/bdscript/getChannelVar.md +++ b/src/bdscript/getChannelVar.md @@ -22,9 +22,10 @@ Command used `$getChannelVar[Uses]` times in this channel color: "#E67E22" content: | !example -- username: BDFD Support - color: "#378afa" - bot: true +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true verified: true content: | Command used 1 times in this channel diff --git a/src/bdscript/getCooldown.md b/src/bdscript/getCooldown.md index ba9d0ea0f51..47f30d29136 100644 --- a/src/bdscript/getCooldown.md +++ b/src/bdscript/getCooldown.md @@ -2,19 +2,19 @@ Returns how long is left on the cooldown, in seconds. ```admonish note -This function can be used in the "Error message" field of cooldown functions. +This function can be used in the "Error message" parameter of cooldown functions. ``` ## Syntax ``` -$getCooldown[Cooldown type (normal/server/global)] +$getCooldown[Cooldown type] ``` ### Parameters - `Cooldown type` `(Type: Enum || Flag: Required)`: The type of the cooldown. Cooldown types: - - `normal` - Normal cooldown ([`$cooldown`](./cooldown.md)) - - `server` - Server cooldown ([`$serverCooldown`](./serverCooldown.md)) - - `global` - Global cooldown ([`$globalCooldown`](./globalCooldown.md)) + - `normal` - Normal cooldown ([`$cooldown[]`](./cooldown.md)) + - `server` - Server cooldown ([`$serverCooldown[]`](./serverCooldown.md)) + - `global` - Global cooldown ([`$globalCooldown[]`](./globalCooldown.md)) ## Example ``` @@ -48,4 +48,8 @@ Hello world! verified: true content: | You're on cooldown! (
In 1 hour
) +``` + +```admonish question title="What is this?" +How [`$cooldown[]`](./cooldown.md), [`$sum[]`](./sum.md) and [`$getTimestamp`](./getTimestamp.md) works? ``` diff --git a/src/bdscript/getEmbedData.md b/src/bdscript/getEmbedData.md index dff44d6bd20..0f4bc11cf1f 100644 --- a/src/bdscript/getEmbedData.md +++ b/src/bdscript/getEmbedData.md @@ -17,6 +17,9 @@ $getEmbedData[Channel ID;Message ID;Embed index;Embed property (title/descriptio - `color` - The color border hex of the embed. - `image` - The image of the embed. - `timestamp` - The timestamp of the embed. +```admonish tip title="Timestamp Converter" +You can use our ["Timestamp Converter" tool](../tools/timestamp.md) to work with unixtime! +``` ## Example ``` @@ -26,3 +29,4 @@ Description: $getEmbedData[876920205526319144;878299081380876339;1;description] Footer: $getEmbedData[876920205526319144;878299081380876339;1;footer] ``` ![example](https://user-images.githubusercontent.com/69215413/130266834-50421e8e-fe9f-4b2e-8937-c9b870f3296d.png) + diff --git a/src/bdscript/getRoleColor.md b/src/bdscript/getRoleColor.md index 233bae0f7a8..d47a8225923 100644 --- a/src/bdscript/getRoleColor.md +++ b/src/bdscript/getRoleColor.md @@ -6,6 +6,10 @@ Returns a role's color hex. $getRoleColor[Role ID] ``` +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to test colors! +``` + ### Parameters - `Role ID` `(Type: Snowflake || Flag: Required)`: The role to get the color hex from. @@ -32,3 +36,4 @@ Color: #$getRoleColor[$highestRole[$authorID]] ```admonish question title="What is this?" How [`$authorID`](./authorID.md) and [`$highestRole[]`](./highestRoleComplex.md) works? ``` + diff --git a/src/bdscript/getTimestamp.md b/src/bdscript/getTimestamp.md index 1c55763e261..b87ee5c2e93 100644 --- a/src/bdscript/getTimestamp.md +++ b/src/bdscript/getTimestamp.md @@ -6,6 +6,10 @@ Returns the current [unix timestamp](https://www.unixtimestamp.com/) in seconds. $getTimestamp ``` +```admonish tip title="Timestamp Converter" +You can use our ["Timestamp Converter" tool](../tools/timestamp.md) to work with unixtime! +``` + ## Example ``` $nomention @@ -27,6 +31,10 @@ Current Unix-time: $getTimestamp
``` -> For more info about UNIX timestamps on Discord click [here](../resources/discordTimestamps.md). +```admonish note +For more info about UNIX timestamps on Discord click [here](../resources/discordTimestamps.md). +``` + + diff --git a/src/bdscript/getTimestampComplex.md b/src/bdscript/getTimestampComplex.md index 63f3162e9a8..b7a3c8aa782 100644 --- a/src/bdscript/getTimestampComplex.md +++ b/src/bdscript/getTimestampComplex.md @@ -6,13 +6,19 @@ Returns the current [unix timestamp](https://www.unixtimestamp.com/) in the sele $getTimestamp[Time unit] ``` +```admonish tip title="Timestamp Converter" +You can use our ["Timestamp Converter" tool](../tools/timestamp.md) to work with unixtime! +``` + ### Parameters - `Time unit` `(Type: Enum || Flag: Required)`: Sets timestamp time unit. - -> Time unit value can either be : -> - `s` (seconds) -> - `ms` (milliseconds) -> - `ns` (nanoseconds) + +```admonish info title="Possible input" +- Time unit value can either be: +- `s` (seconds) +- `ms` (milliseconds) +- `ns` (nanoseconds) +``` ## Example ``` @@ -38,6 +44,10 @@ In Nanoseconds - $getTimestamp[ns]
``` -> For more info about UNIX timestamps on Discord click [here](../resources/discordTimestamps.md). +```admonish note +For more info about UNIX timestamps on Discord click [here](../resources/discordTimestamps.md). +``` + + diff --git a/src/bdscript/getUserStatus.md b/src/bdscript/getUserStatus.md index 05b3ca04fee..e54816fbcd9 100644 --- a/src/bdscript/getUserStatus.md +++ b/src/bdscript/getUserStatus.md @@ -32,9 +32,10 @@ My status is: `$getUserStatus[$authorID]` color: "#E67E22" content: | !example -- username: BDFD Support - color: "#378afa" - bot: true +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true verified: true content: | My status is: dnd diff --git a/src/bdscript/guildExists.md b/src/bdscript/guildExists.md index ade0727acb6..5a91677a4c1 100644 --- a/src/bdscript/guildExists.md +++ b/src/bdscript/guildExists.md @@ -1,7 +1,9 @@ # $guildExists Checks if the provided guild/server exists. -> Returns `true` if the server exists. Returns `false` if the server doesn't exist or the bot isn't present in the provided server. +```admonish info +Returns `true` if the server exists. Returns `false` if the server doesn't exist or the bot isn't present in the provided server. +``` ## Syntax ``` @@ -14,7 +16,7 @@ $guildExists[Guild ID] ## Example ``` $nomention -$guildExists[$message[1]] +$guildExists[$message] ``` ``` discord yaml @@ -30,3 +32,7 @@ $guildExists[$message[1]] content: | true ``` + +```admonish question title="What is this?" +How [`$message`](./message.md) works? +``` diff --git a/src/bdscript/hasRole.md b/src/bdscript/hasRole.md index 901d1fe5069..7bf0d41b29b 100644 --- a/src/bdscript/hasRole.md +++ b/src/bdscript/hasRole.md @@ -1,7 +1,9 @@ # $hasRole Returns whether or not a user has the provided role. -> "true" means the user has the role, "false" means they don't. +```admonish info +`true` means the user has the role, `false` means they don't. +``` ## Syntax ``` diff --git a/src/bdscript/hostingExpireTime.md b/src/bdscript/hostingExpireTime.md index b8b1514439b..de02322428e 100644 --- a/src/bdscript/hostingExpireTime.md +++ b/src/bdscript/hostingExpireTime.md @@ -6,6 +6,10 @@ Returns your bot's hosting expiration date. $hostingExpireTime ``` +```admonish tip title="Timestamp Converter" +You can use our ["Timestamp Converter" tool](../tools/timestamp.md) to work with unixtime! +``` + ## Example ``` $nomention @@ -18,10 +22,12 @@ My hosting expiration date: $hostingExpireTime color: "#E67E22" content: | !example -- username: BDFD Support - color: "#378afa" - bot: true +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | My hosting expiration date: San, 3 Sep 2029 23:59:00 UTC ``` + diff --git a/src/bdscript/hostingExpireTimeComplex.md b/src/bdscript/hostingExpireTimeComplex.md index 569c50c7314..5133527c7a6 100644 --- a/src/bdscript/hostingExpireTimeComplex.md +++ b/src/bdscript/hostingExpireTimeComplex.md @@ -6,6 +6,10 @@ Returns your bot's hosting expiration date. If "yes" is provided, the function r $hostingExpireTime[Return unix timestamp?] ``` +```admonish tip title="Timestamp Converter" +You can use our ["Timestamp Converter" tool](../tools/timestamp.md) to work with unixtime! +``` + ### Parameters - `Return unix timestamp?` `(Type: Bool || Flag: Required)`: Whether to return the expiration date in a UNIX timestamp or not. @@ -21,10 +25,12 @@ I will be offline color: "#E67E22" content: | !example -- username: BDFD Support +- user_id: 1009018156494368798 + username: BDFD Support color: "#378afa" bot: true verified: true content: | I will be offline
In 4 years
``` + diff --git a/src/bdscript/hour.md b/src/bdscript/hour.md index ecf7b8a3bdd..8d3d319b4c5 100644 --- a/src/bdscript/hour.md +++ b/src/bdscript/hour.md @@ -1,7 +1,9 @@ # $hour Returns the current hour. -> The `$hour` function uses the twenty-four-hour clock instead of two groups of twelve hours; this is also known as "Military Time". +```admonish note +The `$hour` function uses the twenty-four-hour clock instead of two groups of twelve hours; this is also known as "Military Time". +``` ## Syntax ``` @@ -14,16 +16,17 @@ $nomention Current Hour: $hour ``` -``` discord yaml -- user_id: 729343563401265193 - username: Nicky - color: "#EE7908" - content: | - !hour -- user_id: 566613317972394004 - username: Wiki Bot - color: "#748BD4" - bot: true +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true content: |
``` diff --git a/src/bdscript/if.md b/src/bdscript/if.md index a84dc077bd1..3482876c0cf 100644 --- a/src/bdscript/if.md +++ b/src/bdscript/if.md @@ -38,9 +38,10 @@ $endif color: "#E67E22" content: | !example -- username: BDFD Support - color: "#378afa" - bot: true +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true verified: true content: | You are the developer of this bot! diff --git a/src/bdscript/ignoreChannels.md b/src/bdscript/ignoreChannels.md index 57d789fceb0..2b395e16b08 100644 --- a/src/bdscript/ignoreChannels.md +++ b/src/bdscript/ignoreChannels.md @@ -1,5 +1,39 @@ # $ignoreChannels The command can't be executed in any of the provided channels. If the channel is ignored, then the provided "Error message" is returned. + + ## Syntax ``` @@ -13,15 +47,36 @@ $ignoreChannels[Channel IDs;...;Error message] ## Example ``` $nomention -$ignoreChannels[1099033713687404614;❌ That command can't be used in this channel!] - -Hello $username! +$ignoreChannels[566370477967147018;❌ That command can't be used in this channel!] +Hello world! ``` -**Ignored channel** - -![example1](https://user-images.githubusercontent.com/111157596/233706189-0d168572-a0e8-4c3d-803e-abf31826bb43.png) - -**Whitelisted channel** - -![example2](https://user-images.githubusercontent.com/111157596/233706206-0926d4bc-f0de-47b4-acb0-e7802772575b.png) +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + ❌ That command can't be used in this channel! +``` +\ + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Hello world! +``` diff --git a/src/bdscript/image.md b/src/bdscript/image.md index 05fb5a7aa96..07af9683bb0 100644 --- a/src/bdscript/image.md +++ b/src/bdscript/image.md @@ -17,3 +17,7 @@ $image[$userAvatar[$botID]] ``` ![example](https://user-images.githubusercontent.com/69215413/123516701-76ecb080-d66b-11eb-9c65-fb7bbb5710b4.png) + +```admonish question title="What is this?" +How [`$userAvatar[]`](./userAvatar.md) and [`$botID`](./botID.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/isAdmin.md b/src/bdscript/isAdmin.md index f79e0658aaa..65e0d5c27ef 100644 --- a/src/bdscript/isAdmin.md +++ b/src/bdscript/isAdmin.md @@ -1,7 +1,9 @@ # $isAdmin Returns whether the provided user has the administrator permission or not. -> "true" means the user has the administrator permission, "false" means they don't. +```admonish info +`true` means the user has the administrator permission, `false` means they don't. +``` ## Syntax ``` @@ -29,5 +31,26 @@ Are you an admin?: `$isAdmin[$authorID]` bot: true verified: true content: | - Are you an admin?: true + Are you an admin?: true +- user_id: 863865579483037726 + username: Kemi + color: "#000000" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Are you an admin?: false +- user_id: 863865579483037726 + username: Kemi + color: "#000000" + content: | + Sadly ``` + +```admonish question title="What is this?" +How [`$authorID`](./authorID.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/isBanned.md b/src/bdscript/isBanned.md index 546b99132c7..3103167e2db 100644 --- a/src/bdscript/isBanned.md +++ b/src/bdscript/isBanned.md @@ -1,7 +1,9 @@ # $isBanned Returns whether a user is banned from the current server or not. Requires the `BAN_MEMBERS` permission. -> "true" means the user is banned, "false" means they aren't. +```admonish info +`true` means the user is banned, `false` means they aren't. +``` ## Syntax ``` @@ -14,6 +16,24 @@ $isBanned[User ID] ## Example ``` $nomention -$isBanned[$message[1]] +Banned?: $isBanned[$message] ``` -![example](https://user-images.githubusercontent.com/111157596/233709040-50d9987e-094d-4ddb-b85e-d01db865c840.png) + +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example 551786741296791562 +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Banned?: true +``` + +```admonish question title="What is this?" +How [`$message`](./message.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/isBoolean.md b/src/bdscript/isBoolean.md index 8d8a75bf48b..89cc9b11211 100644 --- a/src/bdscript/isBoolean.md +++ b/src/bdscript/isBoolean.md @@ -1,7 +1,7 @@ # $isBoolean Returns whether the provided text is a boolean or not. -```admonish note +```admonish info `true` means the text is a boolean, `false` means it isn’t. ``` diff --git a/src/bdscript/isBooster.md b/src/bdscript/isBooster.md index c3cf0108174..9fb39555789 100644 --- a/src/bdscript/isBooster.md +++ b/src/bdscript/isBooster.md @@ -1,7 +1,9 @@ # $isBooster Returns if user is boosting guild with nitro. -> "true" means the user is a booster, "false" means it isn't. +```admonish info +"true" means the user is a booster, "false" means it isn't. +``` ## Syntax ``` @@ -13,7 +15,7 @@ $isBooster[(User ID;Guild ID)] ## Example ``` $nomention -Booster? $isBooster[$mentioned[1]] +Booster?: $isBooster[$mentioned[1]] ``` ``` discord yaml @@ -28,8 +30,13 @@ Booster? $isBooster[$mentioned[1]] bot: true verified: true content: | - Booster? true + Booster?: true +``` + +```admonish tip +You can use empty `$isBooster[]` to get the information about author.\ +``` + +```admonish question title="What is this?" +How [`$mentioned[]`](./mentioned.md) works? ``` - -> You can use `$isBooster[]` to get the status of author.\ -> [How `$mentioned[]` works?](./mentioned.md) diff --git a/src/bdscript/isBot.md b/src/bdscript/isBot.md index a07f6e12d16..e1d4c75c179 100644 --- a/src/bdscript/isBot.md +++ b/src/bdscript/isBot.md @@ -1,7 +1,9 @@ # $isBot Returns whether the provided user is a bot or not. -> "true" means the user is a bot, "false" means they aren't. +```admonish info +"true" means the user is a bot, "false" means they aren't. +``` ## Syntax ``` @@ -43,3 +45,7 @@ Bot?: $isBot[$mentioned[1]] content: | Bot?: true ``` + +```admonish question title="What is this?" +How [`$mentioned[]`](./mentioned.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/isHoisted.md b/src/bdscript/isHoisted.md index dc0138a7f05..c4a5fd92d94 100644 --- a/src/bdscript/isHoisted.md +++ b/src/bdscript/isHoisted.md @@ -1,7 +1,9 @@ # $isHoisted Returns whether a role is displayed separately or not. -> "true" means the role is hoisted, "false" means it isn't. +```admonish info +"true" means the role is hoisted, "false" means it isn't. +``` ## Syntax ``` @@ -14,7 +16,11 @@ $isHoisted[Role ID] ## Example ``` $nomention -$isHoisted[$findRole[$message]] +$isHoisted[$message] ``` ![example](https://user-images.githubusercontent.com/69215413/126853587-2be4d152-7254-4424-9fa0-5ab1d93837f7.png) + +```admonish question title="What is this?" +How [`$message`](./message.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/isInteger.md b/src/bdscript/isInteger.md index b07cd09262f..6fe3a76091e 100644 --- a/src/bdscript/isInteger.md +++ b/src/bdscript/isInteger.md @@ -1,7 +1,7 @@ # $isInteger Checks if the specified value is an integer or not. -```admonish note +```admonish info `true` means the value is an integer, `false` means it isn’t. ``` diff --git a/src/bdscript/isMentionable.md b/src/bdscript/isMentionable.md index 200bcd8af14..bc7dcb02d4b 100644 --- a/src/bdscript/isMentionable.md +++ b/src/bdscript/isMentionable.md @@ -1,7 +1,9 @@ # $isMentionable Returns whether a role is mentionable by everyone or not. -> "true" means the role is mentionable, "false" means it isn't. +```admonish info +"true" means the role is mentionable, "false" means it isn't. +``` ![example](https://user-images.githubusercontent.com/69215413/123517230-e5327280-d66d-11eb-8337-35dac5f276e7.png) @@ -16,7 +18,11 @@ $isMentionable[Role ID] ## Example ``` $nomention -$isMentionable[$findRole[$message]] +$isMentionable[$message] ``` -![example](https://user-images.githubusercontent.com/69215413/126853667-5263fa7a-3e79-4691-b33d-509f507670c5.png) +![example](https://user-images.githubusercontent.com/69215413/126853667-5263fa7a-3e79-4691-b33d-509f507670c5.png) + +```admonish question title="What is this?" +How [`$message`](./message.md) works? +``` diff --git a/src/bdscript/isMentioned.md b/src/bdscript/isMentioned.md index 7bbe50be7cf..3d44146f5ab 100644 --- a/src/bdscript/isMentioned.md +++ b/src/bdscript/isMentioned.md @@ -34,3 +34,7 @@ $isMentioned[$mentioned[1]] content: | true ``` + +```admonish question title="What is this?" +How [`$mentioned[]`](./mentioned.md) works? +``` diff --git a/src/bdscript/isMessageEdited.md b/src/bdscript/isMessageEdited.md index f2b4ac356d9..9d6ed9d6ef1 100644 --- a/src/bdscript/isMessageEdited.md +++ b/src/bdscript/isMessageEdited.md @@ -39,5 +39,5 @@ $isMessageEdited[$channelID;$lastMessageID] > [How to get the Message/Channel ID guide.](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-) ```admonish question title="What is this?" -How [`$lastMessageID`](./lastMessageID.md) works? +How [`$channelID`](./channelID.md) and [`$lastMessageID`](./lastMessageID.md) works? ``` diff --git a/src/bdscript/isNSFW.md b/src/bdscript/isNSFW.md index 3e127d1c52b..c5a99abcf79 100644 --- a/src/bdscript/isNSFW.md +++ b/src/bdscript/isNSFW.md @@ -1,7 +1,43 @@ # $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. + + + +```admonish info +"true" means the channel is NSFW, "false" means it isn't. +``` ## Syntax ``` @@ -18,11 +54,6 @@ Is this channel NSFW?: `$isNSFW[$channelID]` ``` ```discord yaml -- user_id: 803569638084313098 - username: RainbowKey - color: "#E67E22" - content: | - NSFW Channel 🤫 - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" @@ -38,11 +69,6 @@ Is this channel NSFW?: `$isNSFW[$channelID]` ``` ```discord yaml -- user_id: 803569638084313098 - username: RainbowKey - color: "#E67E22" - content: | - It's a main chat here! - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" diff --git a/src/bdscript/isNumber.md b/src/bdscript/isNumber.md index 43fea0c94f6..aead1765c3d 100644 --- a/src/bdscript/isNumber.md +++ b/src/bdscript/isNumber.md @@ -1,7 +1,7 @@ # $isNumber Returns whether the provided value is a number or not. -```admonish tip +```admonish info `true` means the value is a number, `false` means it isn’t. ``` diff --git a/src/bdscript/isSlash.md b/src/bdscript/isSlash.md index 3f7ae948ca8..2572c21c29e 100644 --- a/src/bdscript/isSlash.md +++ b/src/bdscript/isSlash.md @@ -1,7 +1,9 @@ # $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. +```admonish info +"true" means the command was ran as a slash command, "false" means it wasn't. +``` ## Syntax ``` diff --git a/src/bdscript/isTicket.md b/src/bdscript/isTicket.md index 6e093655813..be8bdbf10af 100644 --- a/src/bdscript/isTicket.md +++ b/src/bdscript/isTicket.md @@ -1,12 +1,52 @@ # $isTicket Checks whether the current or specified channel is a ticket or not. + + -> "true" means the channel is a ticket, "false" means it isn't. +```admonish info +"true" means the channel is a ticket, "false" means it isn't. +``` ## Syntax ``` $isTicket[(Channel ID)] ``` + +```admonish info +This function uses the channel name to determine whether it is a ticket or not. If the channel name contains `ticket` word, the function will return `true`. +``` ### Parameters - `Channel ID` `(Type: Snowflake || Flag: Optional)`: The channel to check. _(Defaults to the current channel)_ @@ -14,11 +54,40 @@ $isTicket[(Channel ID)] ## Example ``` $nomention -$onlyIf[$isTicket[]==true;This command can only be used in a ticket!] +$onlyIf[$isTicket[]==true;❌ This command can only be used in a ticket!] This is a ticket! ``` -![example](https://user-images.githubusercontent.com/113303649/212466758-7a11f906-f356-438d-8f64-0977c28b5a3c.png)\ -![example](https://user-images.githubusercontent.com/113303649/212466712-3e8d1768-af20-4ea3-9402-8668ae8d9ccc.png) - -> To create a ticket, use the [`$newTicket[]`](./newTicket.md) function. - + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + ❌ This command can only be used in a ticket! +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + This is a ticket! +``` + +```admonish tip +To create a ticket, use the [`$newTicket[]`](./newTicket.md) function. +``` diff --git a/src/bdscript/isTimedOut.md b/src/bdscript/isTimedOut.md index 2a644e1f1f9..8befd31209f 100644 --- a/src/bdscript/isTimedOut.md +++ b/src/bdscript/isTimedOut.md @@ -1,7 +1,9 @@ # $isTimedOut Checks whether the specified user is timed out or not. -> "true" means the user is timed out, "false" means they aren't. +```admonish info +"true" means the user is timed out, "false" means they aren't. +``` ## Syntax ``` @@ -17,3 +19,7 @@ $nomention User is timed out: $isTimedOut[$mentioned[1]] ``` ![example](https://user-images.githubusercontent.com/94063167/198900738-ed1059b6-0d73-4e97-8669-40c770281e51.png) + +```admonish question title="What is this?" +How [`$mentioned[]`](./mentioned.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/isUserDMEnabled.md b/src/bdscript/isUserDMEnabled.md index c962badc400..e94f8be1b7c 100644 --- a/src/bdscript/isUserDMEnabled.md +++ b/src/bdscript/isUserDMEnabled.md @@ -1,7 +1,9 @@ # $isUserDMEnabled Checks whether the bot can DM the user or not. - -> "true" means the bot can DM the user, "false" means it can't. + +```admonish info +"true" means the bot can DM the user, "false" means it can't. +``` ## Syntax ``` diff --git a/src/bdscript/isValidHex.md b/src/bdscript/isValidHex.md index ae22a146774..cdf3c1ff359 100644 --- a/src/bdscript/isValidHex.md +++ b/src/bdscript/isValidHex.md @@ -62,6 +62,10 @@ Is valid HEX? $isValidHex[$message] How [`$message`](./message.md) works? ``` +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to choose colors! +``` +

🤖 Playground

Here you can understand how this function works.

@@ -74,3 +78,4 @@ How [`$message`](./message.md) works? Is valid HEX? true
+ diff --git a/src/bdscript/joinSplitText.md b/src/bdscript/joinSplitText.md index 4b22f96988d..23908d9663d 100644 --- a/src/bdscript/joinSplitText.md +++ b/src/bdscript/joinSplitText.md @@ -23,12 +23,17 @@ $joinSplitText[+] color: "#E67E22" content: | !example hello-world-! -- username: BDFD Support - color: "#378afa" - bot: true +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | hello+world+! ``` + +```admonish question title="What is this?" +How [`$textSplit[]`](./textSplit.md) and [`$message`](./message.md) works? +``` > For more info, see the [Text Splitting Guide](../guides/general/textSplitting.md). diff --git a/src/bdscript/kick.md b/src/bdscript/kick.md index a797679be9e..261b57c2081 100644 --- a/src/bdscript/kick.md +++ b/src/bdscript/kick.md @@ -9,3 +9,10 @@ $kick ### Permissions Required permissions that the bot must have for this function to work properly: - `kick` + +## Example +``` +$nomention +$kick +Bye +``` \ No newline at end of file diff --git a/src/bdscript/kickComplex.md b/src/bdscript/kickComplex.md index b47ab51344f..816b4abada1 100644 --- a/src/bdscript/kickComplex.md +++ b/src/bdscript/kickComplex.md @@ -13,8 +13,10 @@ $kick[User ID;(Reason)] ## Example ``` $nomention -$kick[$mentioned[1];$noMentionMessage] -✅ Kicked `$username[$mentioned[1]]#$discriminator[$mentioned[1]]`! -``` +$kick[$mentioned[1];Bad guy] +✅ Kicked! +``` -![example](https://user-images.githubusercontent.com/69215413/123518740-4742a600-d675-11eb-8581-1707b6989203.png) +```admonish question title="What is this?" +How [`$mentioned[]`](./mentioned.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/kickMention.md b/src/bdscript/kickMention.md index 3b4d59e8bb0..fcdd57abdcc 100644 --- a/src/bdscript/kickMention.md +++ b/src/bdscript/kickMention.md @@ -1,7 +1,9 @@ # $kickMention -A simplified version of `$kick`. Kicks the mentioned user. - -> **Note:** The user running the command must have the "kick" permission. +A simplified version of [`$kick`](./kick.md). Kicks the mentioned user. + +```admonish warning +The user running the command must have the "kick" permission. +``` ## Syntax ``` @@ -19,7 +21,9 @@ Required permissions that the bot must have for this function to work properly: ``` $nomention $kickMention[$noMentionMessage] -✅ Kicked `$username[$mentioned[1]]#$discriminator[$mentioned[1]]`! +✅ Kicked! ``` -![example](https://user-images.githubusercontent.com/69215413/123518897-0f882e00-d676-11eb-9c32-4ee9bddd787d.png) +```admonish question title="What is this?" +How [`$noMentionMessage`](./noMentionMessage.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/lastPinTimestamp.md b/src/bdscript/lastPinTimestamp.md index 5fae7c6f072..2ec2eafd7ba 100644 --- a/src/bdscript/lastPinTimestamp.md +++ b/src/bdscript/lastPinTimestamp.md @@ -1,11 +1,15 @@ # $lastPinTimestamp -Returns the last pinned message timestamp in the current channel. +Returns the last pinned message unixtime in the current channel. ## Syntax ``` $lastPinTimestamp ``` +```admonish tip title="Timestamp Converter" +You can use our ["Timestamp Converter" tool](../tools/timestamp.md) to work with unixtime! +``` + ## Example ``` $nomention diff --git a/src/bdscript/message.md b/src/bdscript/message.md index e6d34511763..db92997ddce 100644 --- a/src/bdscript/message.md +++ b/src/bdscript/message.md @@ -17,7 +17,7 @@ $message username: Nicky color: "#EE7908" content: | - !say Hello everyone 👋 + !example Hello everyone 👋 - user_id: 566613317972394004 username: Wiki Bot color: "#748BD4" diff --git a/src/bdscript/messageComplex.md b/src/bdscript/messageComplex.md index 1d21bb31121..02386fda055 100644 --- a/src/bdscript/messageComplex.md +++ b/src/bdscript/messageComplex.md @@ -9,13 +9,17 @@ $message[Argument number;(Argument name)] ### Parameters - `Argument number` `(Type: HowMany, String || Flag: Required)`: Returns the argument matching the provided number. - `Argument name` `(Type: String || Flag: Optional)`: Returns the input of the matching slash command option. - -> 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. + +```admonish example +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 If you want this function to work in a slash command **only**, then you can use `$message[Argument name]`. If this function should work in a normal **and** slash command, then you can use `$message[Argument number;Argument name]`. - -> For example, `$message[message]` would just return the input of the slash command option named "message". `$message[1;text]` would return the first word of the message **or** the input of the slash command option named "text". + +```admonish example +For example, `$message[message]` would just return the input of the slash command option named "message". `$message[1;text]` would return the first word of the message **or** the input of the slash command option named "text". +``` Find more info about optimizing `$message[]` for slash commands [here](../guides/general/interactions/slashCommands/aboutSlashCommands.md#retrieving-value-from-options). diff --git a/src/bdscript/messageEditedTimestamp.md b/src/bdscript/messageEditedTimestamp.md index e21cec9c1ef..f5f9be69880 100644 --- a/src/bdscript/messageEditedTimestamp.md +++ b/src/bdscript/messageEditedTimestamp.md @@ -1,11 +1,15 @@ # $messageEditedTimestamp -Returns a timestamp of when the message was edited. +Returns an unixtime of when the message was edited. ## Syntax ``` $messageEditedTimestamp[Channel ID;Message ID] ``` +```admonish tip title="Timestamp Converter" +You can use our ["Timestamp Converter" tool](../tools/timestamp.md) to work with unixtime! +``` + ### Parameters - `Channel ID` `(Type: Snowflake || Flag: Required)`: The channel ID where the message is. - `Message ID` `(Type: Snowflake || Flag: Required)`: The message ID of the message. @@ -18,4 +22,6 @@ $messageEditedTimestamp[$channelID;$lastMessageID] ![](https://github.com/user-attachments/assets/a432d7ba-6824-481c-8cec-2d7880ebbd2f) -> [How to get the Message/Channel ID guide.](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-) +```admonish help +[How to get the Message/Channel ID guide.](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-) +``` diff --git a/src/bdscript/messageID.md b/src/bdscript/messageID.md index e76ecc6c596..4529273b9c8 100644 --- a/src/bdscript/messageID.md +++ b/src/bdscript/messageID.md @@ -2,7 +2,7 @@ Returns the ID of the author's message. ```admonish info -If this function is written in `$onInteraction`/`$onInteraction[]` commands, it will return the bot's message ID. +If this function is written in [`$onInteraction`](../callbacks/onInteraction.md) or [`$onInteraction[]`](../callbacks/onInteractionComplex.md) callbacks, it will return the bot's message ID. ``` ## Syntax @@ -13,7 +13,20 @@ $messageID ## Example ``` $nomention -$messageID +Message ID: `$messageID` ``` -![example](https://user-images.githubusercontent.com/69215413/126917461-39754ee4-37dd-4a3e-9d72-258b514a8c7d.png) +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Message ID: 1446827813184208896 +``` \ No newline at end of file diff --git a/src/bdscript/modifyChannel.md b/src/bdscript/modifyChannel.md index ce648cb05b8..8b18d78b381 100644 --- a/src/bdscript/modifyChannel.md +++ b/src/bdscript/modifyChannel.md @@ -13,10 +13,14 @@ $modifyChannel[Channel ID;(Channel Name;Topic;Make NSFW?;Position;Category ID)] - `Make NSFW?` `(Type: Bool || Flag: Vacantable)`: Whether the channel will be marked as NSFW or not. - `Position` `(Type: Integer || Flag: Vacantable)`: The new channel position *(1 = top)*. - `Category ID` `(Type: Snowflake || Flag: Vacantable)`: The category to which the channel should belong to. - -> You can use `!unchanged` as an parameter for the option to remain in its current state. - -> You can use `$channelID[Category/Channel Name]` to get the ID of a category or channel. + +```admonish tip +You can use `!unchanged` as an parameter for the option to remain in its current state. +``` + +```admonish tip +You can use [`$channelID[Category/Channel Name]`](./channelIDComplex.md) to get the ID of a category or channel. +``` ### Permissions Required permissions that the bot must have for this function to work properly : diff --git a/src/bdscript/modifyChannelPerms.md b/src/bdscript/modifyChannelPerms.md index 1fbd841ae26..6330fbeae43 100644 --- a/src/bdscript/modifyChannelPerms.md +++ b/src/bdscript/modifyChannelPerms.md @@ -3,8 +3,9 @@ Deprecated -> This function is deprecated, instead better use [`$editChannelPerms[]`](./editChannelPerms.md). - +```admonish warning +This function has been deprecated in favor of [`$editChannelPerms[]`](./editChannelPerms.md). +``` Modifies a channel's permissions. ## Syntax diff --git a/src/bdscript/modifyRole.md b/src/bdscript/modifyRole.md index b7e2a4709f1..3cf85f176ca 100644 --- a/src/bdscript/modifyRole.md +++ b/src/bdscript/modifyRole.md @@ -6,12 +6,18 @@ Modifies an existing role. $modifyRole[Role ID;(Role name;Color hex;Hoisted?;Mentionable?)] ``` -> You can use `!unchanged` as an argument to leave the setting as-is. +```admonish tip +You can use `!unchanged` as an argument to leave the setting as-is. +``` ### Parameters - `Role ID` `(Type: Snowflake || Flag: Required)`: The ID of the role to modify. - `Role name` `(Type: String || Flag: Optional)`: The new role name. -- `Color hex` `(Type: Color || Flag: Optional)`: The new role color. +- `Color hex` `(Type: Color || Flag: Optional)`: The new role [color hex](../tools/color.md). You can also use color integer number. +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to select the best color! +``` + - `Hoisted?` `(Type: Bool || Flag: Optional)`: Whether the role should be displayed separately or not. - `Mentionable?` `(Type: Bool || Flag: Optional)`: Whether the role should be mentionable by everyone or not. @@ -27,3 +33,4 @@ $description[✅ Changed role name of <@&$findRole[$message[1]]>] ``` ![example](https://user-images.githubusercontent.com/69215413/123530371-771a9980-d6c7-11eb-987d-c4ba3bb40bd1.png) + diff --git a/src/bdscript/multi.md b/src/bdscript/multi.md index de64885efee..59bb5a8ef0a 100644 --- a/src/bdscript/multi.md +++ b/src/bdscript/multi.md @@ -3,11 +3,11 @@ Muliplies the provided numbers. ## Syntax ``` -$multi[Number;..] +$multi[Numbers;..] ``` ### Parameters -- `Number` `(Type: Float, Integer || Flag: Required)`: The numbers to multiply. Use semicolons `;` as a separator to separate multiple numbers. +- `Numbers` `(Type: Float, Integer || Flag: Required)`: The numbers to multiply. Use semicolons `;` as a separator to separate multiple numbers. ## Example ``` diff --git a/src/bdscript/mute.md b/src/bdscript/mute.md index ea7c65872b7..5578fa2f580 100644 --- a/src/bdscript/mute.md +++ b/src/bdscript/mute.md @@ -3,7 +3,9 @@ Deprecated -> This function is deprecated, instead better use [`$timeout[]`](https://nilpointer-software.github.io/bdfd-wiki/bdscript/timeout.html). +```admonish warning +As of December 2021, this function has been deprecated in favor of [`$timeout[]`](./timeout.md). +``` Mutes the mentioned user. diff --git a/src/bdscript/nickname.md b/src/bdscript/nickname.md index 752c1d4bacb..f6f47204df0 100644 --- a/src/bdscript/nickname.md +++ b/src/bdscript/nickname.md @@ -1,7 +1,9 @@ # $nickname Returns the nickname of the author of the message. - -> Nickname means the user's server nickname. If the user doesn't have a nickname then their display name is returned instead. + +```admonish info +Nickname means the user's server nickname. If the user doesn't have a nickname then their display name is returned instead. +``` ## Syntax ``` diff --git a/src/bdscript/nicknameComplex.md b/src/bdscript/nicknameComplex.md index e0fc0e26b54..74f995d9bf2 100644 --- a/src/bdscript/nicknameComplex.md +++ b/src/bdscript/nicknameComplex.md @@ -1,7 +1,9 @@ # $nickname[] Returns the nickname of the given user. - -> Nickname means the user's server nickname. If the user doesn't have a nickname then their display name is returned instead. + +```admonish info +Nickname means the user's server nickname. If the user doesn't have a nickname then their display name is returned instead. +``` ## Syntax ``` diff --git a/src/bdscript/noMentionMessage.md b/src/bdscript/noMentionMessage.md index 8019b3c1f6e..89305e2787e 100644 --- a/src/bdscript/noMentionMessage.md +++ b/src/bdscript/noMentionMessage.md @@ -26,20 +26,32 @@ Message: $noMentionMessage content: | Hello ! ``` + + +~~~admonish example - Lets use [`$message`](./message.md) instead of `$noMentionMessage`: + +``` +$nomention +Message: $message +``` ``` discord yaml - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" content: | - !example Hello <@MineBartekSA>! + !example Hello <@Kuba>! - username: BDFD Support user_id: 1009018156494368798 color: "#378afa" bot: true verified: true content: | - Hello @MineBartekSA! -``` + Hello @Kuba! +``` + +> How [`$message`](./message.md) works? + +~~~ diff --git a/src/bdscript/noMentionMessageComplex.md b/src/bdscript/noMentionMessageComplex.md index 2bf3593dbe4..29ddb4e8d2f 100644 --- a/src/bdscript/noMentionMessageComplex.md +++ b/src/bdscript/noMentionMessageComplex.md @@ -8,8 +8,10 @@ $noMentionMessage[Argument number] ### Parameters - `Argument number` `(Type: HowMany || Flag: Required)`: Returns the argument matching the provided number *(excluding mentions)*. - -> For example, `$noMentionMessage[1]` would just return the first word of the message, ignoring any possible mentions before. You can also use `$noMentionMessage[>]` to get the last argument/word of the user's message. + +```admonish example +For example, `$noMentionMessage[1]` would just return the first word of the message, ignoring any possible mentions before. You can also use `$noMentionMessage[>]` to get the last argument/word of the user's message. +``` ## Example ``` diff --git a/src/bdscript/nodeVersion.md b/src/bdscript/nodeVersion.md index af220a8a1ec..4f2d12163dc 100644 --- a/src/bdscript/nodeVersion.md +++ b/src/bdscript/nodeVersion.md @@ -27,4 +27,6 @@ Node version: $nodeVersion Node version: 06-09-2024-6c7eada ``` -> You can use [`$botNode`](./botNode.md) to find out which node your bot is on. +```admonish tip +You can use [`$botNode`](./botNode.md) to find out which node your bot is on. +``` \ No newline at end of file diff --git a/src/bdscript/nodeVersionComplex.md b/src/bdscript/nodeVersionComplex.md index 702aea42fec..fc00415024e 100644 --- a/src/bdscript/nodeVersionComplex.md +++ b/src/bdscript/nodeVersionComplex.md @@ -8,8 +8,10 @@ $nodeVersion[Node Number] ### Parameters - `Node Number` `(Type: Integer || Flag: Required)`: The number of the node for which to return its version. - -> You can use [`$botNode`](./botNode.md) to find out which node your bot is on. + +```admonish tip +You can use [`$botNode`](./botNode.md) to find out which node your bot is on. +``` ## Example ``` diff --git a/src/bdscript/nomention.md b/src/bdscript/nomention.md index a707ad38b4f..b5b750f5f26 100644 --- a/src/bdscript/nomention.md +++ b/src/bdscript/nomention.md @@ -26,6 +26,8 @@ Hello World! content: | Hello world! ``` + +~~~admonish example - Without `$nomention`: @@ -44,3 +46,5 @@ Hello World! content: | <@RainbowKey> Hello world! ``` + +~~~ \ No newline at end of file diff --git a/src/bdscript/onlyIf.md b/src/bdscript/onlyIf.md index 7afa1626be7..4307dfab9d0 100644 --- a/src/bdscript/onlyIf.md +++ b/src/bdscript/onlyIf.md @@ -18,8 +18,6 @@ $onlyIf[Condition;Error message] - `<=` - Less Than Or Equal To - `>=` - Greater Than Or Equal To -> ⚠️ The signs `<`, `>`, `<=` and `>=` only work with numbers. - ## Examples #### Equal (`==`) ``` diff --git a/src/bdscript/onlyIfMessageContains.md b/src/bdscript/onlyIfMessageContains.md index 279f570c5f2..7505ee707cc 100644 --- a/src/bdscript/onlyIfMessageContains.md +++ b/src/bdscript/onlyIfMessageContains.md @@ -70,5 +70,5 @@ Hello world! ``` ```admonish question title="What is this?" -How [`$username`](./username.md) works? +How [`$message`](./message.md) works? ``` diff --git a/src/bdscript/parentID.md b/src/bdscript/parentID.md index 017ca9b8834..2c31d28170f 100644 --- a/src/bdscript/parentID.md +++ b/src/bdscript/parentID.md @@ -11,4 +11,38 @@ $parentID $nomention Current category: $parentID ``` -![example](https://user-images.githubusercontent.com/94063167/199015904-8c1635fc-ae14-40e6-9102-5f0a94a65cb7.png) + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Current category: 567445224989786132 +``` + +~~~admonish example +Returns empty if no parent (category) was found: + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Current category: +``` + +~~~ \ No newline at end of file diff --git a/src/bdscript/parentIDComplex.md b/src/bdscript/parentIDComplex.md index 4417434351c..29d9a03a4f1 100644 --- a/src/bdscript/parentIDComplex.md +++ b/src/bdscript/parentIDComplex.md @@ -12,6 +12,44 @@ $parentID[Channel ID] ## Example ``` $nomention -Category ID: $parentID[$mentionedChannels[1]] +Category: $parentID[$mentionedChannels[1]] ``` -![example](https://user-images.githubusercontent.com/94063167/199022843-84b86272-d690-4630-99ba-80e024ffea52.png) + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example <#bot-commands-1> +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Category: 612065938715574273 +``` + +~~~admonish example +Returns empty if no parent (category) was found: + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example <#developers> +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Category: +``` + +~~~ + +```admonish question title="What is this?" +How [`$mentionedChannels[]`](./mentionedChannels.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/pinMessage.md b/src/bdscript/pinMessage.md index 433d64e46e0..ad7ecaf2571 100644 --- a/src/bdscript/pinMessage.md +++ b/src/bdscript/pinMessage.md @@ -1,7 +1,9 @@ # $pinMessage Pins the bot's response message in the current channel. - -> ⚠️ A channel can have a maximum of 50 pinned messages. + +```admonish warning title="Limit" +A channel can have a maximum of 250 pinned messages. +``` ## Syntax ``` diff --git a/src/bdscript/pinMessageComplex.md b/src/bdscript/pinMessageComplex.md index 35bdc079746..0b6208fc558 100644 --- a/src/bdscript/pinMessageComplex.md +++ b/src/bdscript/pinMessageComplex.md @@ -1,7 +1,9 @@ # $pinMessage[] Pins a specific message using its channel and message ID. - -> ⚠️ A channel can have a maximum of 50 pinned messages. + +```admonish warning title="Limit" +A channel can have a maximum of 250 pinned messages. +``` ## Syntax ``` diff --git a/src/bdscript/ping.md b/src/bdscript/ping.md index ab36fe9effe..075e2df0f4e 100644 --- a/src/bdscript/ping.md +++ b/src/bdscript/ping.md @@ -1,5 +1,5 @@ # $ping -Returns the ping of the bot's node, in milliseconds. +Returns the ping of **the bot's node**, in milliseconds. ## Syntax ``` diff --git a/src/bdscript/premiumExpireTime.md b/src/bdscript/premiumExpireTime.md index 66fb8f51d6b..9bb1286a548 100644 --- a/src/bdscript/premiumExpireTime.md +++ b/src/bdscript/premiumExpireTime.md @@ -1,13 +1,19 @@ # $premiumExpireTime Returns how long until premium expires. -> Returns "expired" if the bot is not premium. +```admonish info +Returns `expired` if the bot is not premium. +``` ## Syntax ``` $premiumExpireTime[(Return unix timestamp?)] ``` +```admonish tip title="Timestamp Converter" +You can use our ["Timestamp Converter" tool](../tools/timestamp.md) to work with unixtime! +``` + ### Parameters - `Return unix timestamp?` `(Type: Bool || Flag: Optional)`: If "yes" is written, it will return the premium expiration value in UNIX timestamp and if "no", it will output as normal time format. Defaults to "no". @@ -43,3 +49,4 @@ My premium expires in: $premiumExpireTime (Unix Timestamp: $premiumExpireTime[ye content: | My premium expires in: expired (Unix Timestamp: expired) ``` + diff --git a/src/bdscript/random.md b/src/bdscript/random.md index f3d4552aff8..cc88f14930e 100644 --- a/src/bdscript/random.md +++ b/src/bdscript/random.md @@ -18,9 +18,10 @@ The random number is **$random** color: "#E67E22" content: | !example -- username: BDFD Support - color: "#378afa" - bot: true +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true verified: true content: | The random number is 4 diff --git a/src/bdscript/randomCategoryID.md b/src/bdscript/randomCategoryID.md index a94b0fe652d..243ac9d972b 100644 --- a/src/bdscript/randomCategoryID.md +++ b/src/bdscript/randomCategoryID.md @@ -31,5 +31,5 @@ Random Category: $channelName[$randomCategoryID[]] ``` ```admonish question title="What is this?" -How [`$channelName`](./channelName.md) works? +How [`$channelName[]`](./channelName.md) works? ``` diff --git a/src/bdscript/randomChannelID.md b/src/bdscript/randomChannelID.md index 234973b735e..856064bd6fd 100644 --- a/src/bdscript/randomChannelID.md +++ b/src/bdscript/randomChannelID.md @@ -7,9 +7,26 @@ $randomChannelID ``` ## Example -``` -$nomention -Here's A Random Channel: <#$randomChannelID> -``` - -![example](https://user-images.githubusercontent.com/69215413/123358259-2aa15380-d539-11eb-995e-71d92bd9e67c.png) +``` +$nomention +Random Channel: $channelName[$randomChannelID] +``` + +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true + verified: true + content: | + Random Channel: 😎main-chat +``` + +```admonish question title="What is this?" +How [`$channelName[]`](./channelName.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/randomGuildID.md b/src/bdscript/randomGuildID.md index bd2333f4d07..d6f7eb2f2b8 100644 --- a/src/bdscript/randomGuildID.md +++ b/src/bdscript/randomGuildID.md @@ -24,5 +24,9 @@ Random Guild: $serverName[$randomGuildID] verified: true content: | Random Guild: Bot Designer for Discord Official Server +``` + +```admonish question title="What is this?" +How [`$serverName[]`](./serverName.md) works? ``` diff --git a/src/bdscript/randomMention.md b/src/bdscript/randomMention.md index 4ac8362427d..f3d6a7e6a00 100644 --- a/src/bdscript/randomMention.md +++ b/src/bdscript/randomMention.md @@ -11,4 +11,18 @@ $randomMention $nomention Random User: $randomMention ``` -![example](https://user-images.githubusercontent.com/111157596/233840567-c149b9b3-35d5-4a81-95f2-5b2bdc6a5271.png) + +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true + verified: true + content: | + Random User: <@Kuba> +``` \ No newline at end of file diff --git a/src/bdscript/randomRoleID.md b/src/bdscript/randomRoleID.md index c9870dea678..41145c86d79 100644 --- a/src/bdscript/randomRoleID.md +++ b/src/bdscript/randomRoleID.md @@ -29,8 +29,10 @@ Random Role: $roleName[$randomRoleID[]] content: | Random Role: Owner ``` + +~~~admonish warning -> It can return the `@everyone` role ID! +It can return the `@everyone` role ID! ``` discord yaml - user_id: 803569638084313098 @@ -47,7 +49,9 @@ Random Role: $roleName[$randomRoleID[]] Random Role: <@everyone> highlight: true ``` + +~~~ ```admonish question title="What is this?" -How [`$roleName`](./roleName.md) works? +How [`$roleName[]`](./roleName.md) works? ``` diff --git a/src/bdscript/randomText.md b/src/bdscript/randomText.md index 08abc4eed85..4696d60880c 100644 --- a/src/bdscript/randomText.md +++ b/src/bdscript/randomText.md @@ -27,7 +27,7 @@ $randomText[Hello;Hi;Hey]! bot: true verified: true content: | - Random Text: Hello! + Hello! - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" @@ -39,7 +39,7 @@ $randomText[Hello;Hi;Hey]! bot: true verified: true content: | - Random Text: Hey! + Hey! - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" @@ -51,7 +51,7 @@ $randomText[Hello;Hi;Hey]! bot: true verified: true content: | - Random Text: Hello! + Hello! - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" @@ -63,5 +63,5 @@ $randomText[Hello;Hi;Hey]! bot: true verified: true content: | - Random Text: Hi! + Hi! ``` diff --git a/src/bdscript/registerGuildCommandsComplex.md b/src/bdscript/registerGuildCommandsComplex.md index c09396d0598..b36ac32c53c 100644 --- a/src/bdscript/registerGuildCommandsComplex.md +++ b/src/bdscript/registerGuildCommandsComplex.md @@ -25,7 +25,8 @@ Successfully registered the guild slash command `/help`! $nomention $argsCheck[>1;Provide guild slash command names!] -$unregisterGuildCommands[$unescape[$toLowercase[$replaceText[$trimSpace[$message]; ;]]]] +$registerGuildCommands[$unescape[$toLowercase[$replaceText[$trimSpace[$message]; ;]]]] Successfully registered the provided guild slash commands! ``` ![example2](https://user-images.githubusercontent.com/111157596/233842084-413aec63-8cdd-4295-b3d3-0fe660b13792.png) + diff --git a/src/bdscript/roleInfo.md b/src/bdscript/roleInfo.md index e15220fa391..2034d60668f 100644 --- a/src/bdscript/roleInfo.md +++ b/src/bdscript/roleInfo.md @@ -17,6 +17,10 @@ You can use the following "commands" within `$roleInfo[]`: - `{mentionable}` - Returns if the role is mentionable by everyone. - `{hoist}` - Returns if the role is hoisted (displayed separately). - `{color}` - Returns the role's color. +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to test colors! +``` + - `{position}` - Returns the role's position on the "roles list". > `$roleInfo[]` automatically generates a description. So, `$description[]` should not be used in the code. @@ -34,3 +38,4 @@ $title[Role Info] ``` ![example](https://user-images.githubusercontent.com/69215413/122831224-8f4d7b80-d2b7-11eb-838a-fc2ba7cd7476.png) + diff --git a/src/bdscript/rolePosition.md b/src/bdscript/rolePosition.md index 873e489e32b..9c5fc2f7256 100644 --- a/src/bdscript/rolePosition.md +++ b/src/bdscript/rolePosition.md @@ -7,12 +7,29 @@ $rolePosition[Role ID] ``` ### Parameters -- `Role ID` `(Type: Snowflake || Flag: Required)`: The role for which to get its position. +- `Role ID` `(Type: Snowflake || Flag: Required)`: The role for which to get it's position. ## Example ``` $nomention -$description[<@&$findRole[$message]>'s Position: $rolePosition[$findRole[$message]]] +Role Position: $rolePosition[$message] ``` -![example](https://user-images.githubusercontent.com/69215413/126246527-d3ca814d-8c7d-4acf-bb1e-ec7286c741f0.png) +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example 568155071997542410 +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Role Position: 6 +``` + +```admonish question title="What is this?" +How [`$message`](./message.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/rulesChannelID.md b/src/bdscript/rulesChannelID.md index 8b724d5d2d0..cef9f590cf5 100644 --- a/src/bdscript/rulesChannelID.md +++ b/src/bdscript/rulesChannelID.md @@ -29,6 +29,10 @@ Rule channel's ID: $rulesChannelID[$guildID] content: | Rule channel's ID: 594598851155984426 ``` + +```admonish question title="What is this?" +How [`$guildID`](./guildID.md) works? +``` ~~~admonish tip title="How to stop the error message?" The `$rulesChannelID[]` function as said in above returns an error if there isn't any rule channel set on the server and there is a way to stop that. diff --git a/src/bdscript/scriptLanguage.md b/src/bdscript/scriptLanguage.md index c1d5e4e7aaa..15b33a597fa 100644 --- a/src/bdscript/scriptLanguage.md +++ b/src/bdscript/scriptLanguage.md @@ -5,17 +5,30 @@ Returns the name of scripting language used by the command. ``` $scriptLanguage ``` + +```admonish note title="Possible Outputs" +- BDScript +- BDScript 2 +- BDScript Unstable +``` ## Example ``` $nomention -This command uses `$scriptLanguage`. +This command uses $scriptLanguage. ``` -![](https://user-images.githubusercontent.com/70456337/183467283-fb264df3-27ea-4111-85bd-9d336d221fa9.png) - -> **Note:** After each execution of the command, we changed the script to another one. - -### Output value -- BDScript -- BDScript 2 -- BDScript Unstable \ No newline at end of file + +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + This command uses BDScript 2. +``` \ No newline at end of file diff --git a/src/bdscript/sendEmbedMessage.md b/src/bdscript/sendEmbedMessage.md index 932e74b1cfe..7b46c03c631 100644 --- a/src/bdscript/sendEmbedMessage.md +++ b/src/bdscript/sendEmbedMessage.md @@ -3,7 +3,7 @@ Sends an embed message to the provided channel. Not needed fields can be left em ## Syntax ``` -$sendEmbedMessage[Channel ID;Content;(Title;Title URL;Description;Color;Author;Author icon;Footer;Footer icon;Thumbnail;Image;Add timestamp?;Return ID?)] +$sendEmbedMessage[Channel ID;Content;(Title;Title URL;Description;Color hex;Author;Author icon;Footer;Footer icon;Thumbnail;Image;Add timestamp?;Return ID?)] ``` ### Parameters @@ -12,7 +12,11 @@ $sendEmbedMessage[Channel ID;Content;(Title;Title URL;Description;Color;Author;A - `Title` `(Type: String || Flag: Vacantable)`: The text that will be used as the title. - `Title URL` `(Type: URL || Flag: Vacantable)`: The URL that will be applied to the title. - `Description` `(Type: String || Flag: Vacantable)`: The description that will be applied to the embed. -- `Color` `(Type: Color || Flag: Vacantable)`: The [color hex](https://htmlcolorcodes.com/color-picker/) or integer to set the embed border color as. +- `Color hex` `(Type: Color || Flag: Vacantable)`: The [color hex](../tools/color.md) to set the embed border color as. You can also use color integer number. +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to select the best color! +``` + - `Author` `(Type: String || Flag: Vacantable )`: The text that appears at the author. - `Author icon` `(Type: URL || Flag: Vacantable)`: The image that appears next to the author. Must be a valid image URL. - `Footer` `(Type: String || Flag: Vacantable)`: The text to set the footer as. @@ -28,3 +32,4 @@ $nomention $sendEmbedMessage[$channelID;;Title;https://discord.com/;description;000000;author;$authorAvatar;footer;$authorAvatar;$authorAvatar;$authorAvatar;no;no] ``` ![image](https://user-images.githubusercontent.com/42785890/151873621-10b17532-93ee-421c-8eea-515f40f1a124.png) + diff --git a/src/bdscript/sendMessage.md b/src/bdscript/sendMessage.md index 420539e867e..90cce85f75a 100644 --- a/src/bdscript/sendMessage.md +++ b/src/bdscript/sendMessage.md @@ -10,21 +10,23 @@ $sendMessage[Text;(Return message ID?)] - `Text` `(Type: String || Flag: Required)`: The text to send in the new message. - `Return message ID?` `(Type: Bool || Flag: Optional)`: Whether to return the ID of the newly sent message, in another message. Defaults to `no`. -## Examples -### Example #1 -``` -$nomention -$sendMessage[This is message #1!] -$sendMessage[This is message #2!] -$sendMessage[This is message #3!] -``` -![example1](https://user-images.githubusercontent.com/69215413/126246807-7beaac06-4fd4-4ae3-a944-dcc66f7c0774.png) - - -### Example #2 -``` -$nomention -$sendMessage[This is message #1!;yes] -$sendMessage[This is message #2!;yes] -``` -![example2](https://user-images.githubusercontent.com/69215413/126246945-2fb29b3f-ab58-4de3-8341-a56a574db423.png) +## Example +``` +$nomention +$sendMessage[Hello world!] +``` + +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Hello world! +``` \ No newline at end of file diff --git a/src/bdscript/serverChannelExists.md b/src/bdscript/serverChannelExists.md index 86475c971b3..d53a9bd9904 100644 --- a/src/bdscript/serverChannelExists.md +++ b/src/bdscript/serverChannelExists.md @@ -3,15 +3,45 @@ Checks if the channel exists in the current server. ## Syntax ``` -$serverChannelExists[Channel ID] +$serverChannelExists[Channel] ``` ### Parameters -- `Channel ID` `(Type: Snowflake, String || Flag: Emptiable)`: Returns "true" if the channel exists, otherwise "false" is returned. +- `Channel` `(Type: Snowflake, String || Flag: Emptiable)`: Returns "true" if the channel exists, otherwise "false" is returned. ## Example ``` $nomention -$serverChannelExists[$message[1]] +Exists?: $serverChannelExists[$message] ``` -![example](https://user-images.githubusercontent.com/111157596/234031742-e57f230d-5086-4552-83e9-31b6c6bbe7b6.png) + +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example 566370477967147018 +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true + verified: true + content: | + Exists?: true +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example dhjejemxndj +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true + verified: true + content: | + Exists?: false +``` + +```admonish question title="What is this?" +How [`$message`](./message.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/setUserVar.md b/src/bdscript/setUserVar.md index 49e54a61995..f0b1d56851e 100644 --- a/src/bdscript/setUserVar.md +++ b/src/bdscript/setUserVar.md @@ -13,5 +13,7 @@ $setUserVar[Variable name;New value;(User ID;Guild ID)] - `Guild ID` `(Type: Snowflake || Flag: Optional)`: The guild to assign the new value to. Uses the current guild if no "Guild ID" is provided. > 📝 User variable values have a max character limit of **4999**. - -> For more info, see the [Variables Guide](../guides/introduction/variables.md). + +```admonish info title="Read more" +For more information, read the the [Variables Guide](../guides/introduction/variables.md). +``` \ No newline at end of file diff --git a/src/bdscript/shardID.md b/src/bdscript/shardID.md index 28a12ac0643..8ee81347884 100644 --- a/src/bdscript/shardID.md +++ b/src/bdscript/shardID.md @@ -25,4 +25,8 @@ Shard: $shardID verified: true content: | Shard: 1 +``` + +```admonish info title="Read more" +For more information, read the the ["Sharding" article](../resources/sharding.md). ``` diff --git a/src/bdscript/shardIDComplex.md b/src/bdscript/shardIDComplex.md index 86b3574d52c..45255de2393 100644 --- a/src/bdscript/shardIDComplex.md +++ b/src/bdscript/shardIDComplex.md @@ -33,3 +33,7 @@ Shard: $shardID[$message] ```admonish question title="What is this?" How [`$message`](./message.md) works? ``` + +```admonish info title="Read more" +For more information, read the the ["Sharding" article](../resources/sharding.md). +``` \ No newline at end of file diff --git a/src/bdscript/slashCommandsCount.md b/src/bdscript/slashCommandsCount.md index fbd8561ef5e..94284c29c56 100644 --- a/src/bdscript/slashCommandsCount.md +++ b/src/bdscript/slashCommandsCount.md @@ -1,5 +1,9 @@ # $slashCommandsCount Returns the number of [slash commands](../guides/general/interactions/slashCommands/aboutSlashCommands.md) the bot has enabled. + +```admonish info +Counts only global slash commands. +``` ## Syntax ``` diff --git a/src/bdscript/splitText.md b/src/bdscript/splitText.md index 210e821a32b..be9218aff2e 100644 --- a/src/bdscript/splitText.md +++ b/src/bdscript/splitText.md @@ -1,22 +1,41 @@ -# $splitText -Retrieves a value from [`$textSplit[]`](./textSplit.md). - -> ⚠️ This function is used with `$textSplit[]`. - -## Syntax -``` -$splitText[Index] -``` - -### Parameters -- `Index` `(Type: HowMany || Flag: Required)`: The split value to get (e.g. `2` for the second split). You can also use `>` to return the last split value i.e `$splitText[>]`. - -## Example -``` -$nomention -$textSplit[Hi-Hello-Hey;-] -$splitText[2] -``` -> The above example will return output as `Hello`. - -> For more info, see the [Text Splitting Guide](../guides/general/textSplitting.md). +# $splitText +Each separated text has a number, i.e. an index. `$splitText` is a function that returns one of the elements of the separated text by an index or the sign `<` - the very first element, or `>` - the very last element. + +## Syntax +``` +$splitText[Index] +``` + +### Parameters +- `Index` `(Type: HowMany || Flag: Required)`: The split value to get (e.g. `2` for the second split). You can also use `>` to return the last split value i.e `$splitText[>]`. + +## Example + +``` +$nomention +$textSplit[hello world !; ] +> $splitText[<] +> $splitText[2] +> $splitText[>] +``` + +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + hello + world + ! +``` + +```admonish question title="What is this?" +How [`$textSplit[]`](./textSplit.md) works? +``` \ No newline at end of file diff --git a/src/bdscript/startThread.md b/src/bdscript/startThread.md index d7b69769dfe..adbdb3a29c1 100644 --- a/src/bdscript/startThread.md +++ b/src/bdscript/startThread.md @@ -3,7 +3,7 @@ Creates a new thread in the provided channel. ## Syntax ``` -$startThread[Name;Channel ID;Message ID;(Archive duration;Return thread/channel ID)] +$startThread[Name;Channel ID;Message ID;(Archive duration;Return thread/channel ID?)] ``` ### Parameters @@ -11,7 +11,7 @@ $startThread[Name;Channel ID;Message ID;(Archive duration;Return thread/channel - `Channel ID` `(Type: Snowflake || Flag: Required)`: The channel where the thread will be created. - `Message ID` `(Type: Snowflake || Flag: Emptiable)`: The message from which the thread will be created. Can be left empty. - `Archive duration` `(Type: Integer || Flag: Optional)`: The duration after which the thread will be auto-archived due to inactivity. Accepts `60` (1 hour), `1440` (1 day), `4320` (3 days), or `10080` (7 days) as input. Defaults to `60`. -- `Return thread/channel ID` `(Type: Bool || Flag: Optional)`: Whether to return the thread channel ID or not. Defaults to `no`. +- `Return thread/channel ID?` `(Type: Bool || Flag: Optional)`: Whether to return the thread channel ID or not. Defaults to `no`. ### Permissions Required permissions that the bot must have for this function to work properly: diff --git a/src/bdscript/sub.md b/src/bdscript/sub.md index ab978060bda..8e4ce237dcb 100644 --- a/src/bdscript/sub.md +++ b/src/bdscript/sub.md @@ -3,11 +3,11 @@ Returns the subtraction of the provided numbers. ## Syntax ``` -$sub[Number;...] +$sub[Numbers;...] ``` ### Parameters -- `Number` `(Type: Integer, Float || Flag: Required)`: The numbers to subtract. Separate multiple values using `;`. +- `Numbers` `(Type: Integer, Float || Flag: Required)`: The numbers to subtract. Separate multiple values using `;`. ## Example ``` diff --git a/src/bdscript/sum.md b/src/bdscript/sum.md index 9b15d879aeb..a98000237fa 100644 --- a/src/bdscript/sum.md +++ b/src/bdscript/sum.md @@ -3,11 +3,11 @@ Returns the addition of the provided numbers. ## Syntax ``` -$sum[Number;...] +$sum[Numbers;...] ``` ### Parameters -- `Number` `(Type: Integer, Float || Flag: Required)`: The numbers to add. Separate multiple values using `;`. +- `Numbers` `(Type: Integer, Float || Flag: Required)`: The numbers to add. Separate multiple values using `;`. ## Example ``` diff --git a/src/bdscript/thumbnail.md b/src/bdscript/thumbnail.md index e41d43ae05f..9b6e92d59ea 100644 --- a/src/bdscript/thumbnail.md +++ b/src/bdscript/thumbnail.md @@ -22,4 +22,8 @@ $nomention $description[This is the thumbnail ↘️] $thumbnail[$authorAvatar] ``` -![example](https://user-images.githubusercontent.com/69215413/126551913-b3746b47-615a-48a3-9729-d07529e33f97.png) +![example](https://user-images.githubusercontent.com/69215413/126551913-b3746b47-615a-48a3-9729-d07529e33f97.png) + +```admonish question title="What is this?" +How [`$description[]`](./description.md) and [`$authorAvatar`](./authorAvatar.md) works? +``` diff --git a/src/bdscript/time.md b/src/bdscript/time.md index d384c327b4e..6e114adfc89 100644 --- a/src/bdscript/time.md +++ b/src/bdscript/time.md @@ -42,5 +42,9 @@ Moscow Time: $optOff[$hour:$minute, $day] content: |
``` + +```admonish question title="What is this?" +How [`$hour`](./hour.md), [`$minute`](./minute.md), [`$day`](./day.md) and [`$optOff[]`](./optOff.md) works? +``` diff --git a/src/bdscript/title.md b/src/bdscript/title.md index 27703782bd4..57b5fccbed3 100644 --- a/src/bdscript/title.md +++ b/src/bdscript/title.md @@ -23,7 +23,7 @@ $title[This is a title!] $description[⬆️ That is a nice title.] ``` -``` discord yaml +```discord yaml - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" @@ -38,4 +38,8 @@ $description[⬆️ That is a nice title.] embed: title: This is a title! description: ⬆️ That is a nice title. +``` + +```admonish question title="What is this?" +How [`$description[]`](./description.md) works? ``` diff --git a/src/bdscript/tts.md b/src/bdscript/tts.md index 859be433674..43636425ed5 100644 --- a/src/bdscript/tts.md +++ b/src/bdscript/tts.md @@ -1,7 +1,9 @@ # $tts Enables Text-to-Speech (TTS) functionality on the bot's response message. - -> 📌 The [TTS](https://support.discord.com/hc/en-us/articles/212517297-Text-to-Speech-101) feature is currently supported only in Discord Desktop and Webapp. + +```admonish warning +The [TTS](https://support.discord.com/hc/en-us/articles/212517297-Text-to-Speech-101) feature is currently supported only in Discord Desktop and Webapp. +``` ## Syntax ``` diff --git a/src/bdscript/unmute.md b/src/bdscript/unmute.md index df0bd6bb542..40af230eb27 100644 --- a/src/bdscript/unmute.md +++ b/src/bdscript/unmute.md @@ -2,8 +2,10 @@
Deprecated
- -> As of December 2021, this function has been deprecated in favor of [`$untimeout[]`](./untimeout.md). + +```admonish warning +As of December 2021, this function has been deprecated in favor of [`$untimeout[]`](./untimeout.md). +``` Unmutes the mentioned user. diff --git a/src/bdscript/unregisterGuildCommandsComplex.md b/src/bdscript/unregisterGuildCommandsComplex.md index 284b5ae5dfe..6215617e55e 100644 --- a/src/bdscript/unregisterGuildCommandsComplex.md +++ b/src/bdscript/unregisterGuildCommandsComplex.md @@ -11,8 +11,7 @@ $unregisterGuildCommands[Slash command name;...] ## Example ``` -$nomention -$argsCheck[>1;Provide guild slash command names!] +$nomention $unregisterGuildCommands[$unescape[$toLowercase[$replaceText[$trimSpace[$message]; ;]]]] Successfully unregistered the provided guild slash commands! diff --git a/src/bdscript/url.md b/src/bdscript/url.md index 81f76e5916d..6d651fc3004 100644 --- a/src/bdscript/url.md +++ b/src/bdscript/url.md @@ -1,7 +1,9 @@ # $url Encodes or decodes the provided text in the URL encoding format. - -> URL encoding is a method of converting reserved, unsafe, or non-ASCII characters to a URL format that is universally accepted and understood by all web browsers and servers while URL decoding is the vice-versa of URL encoding. + +```admonish info +URL encoding is a method of converting reserved, unsafe, or non-ASCII characters to a URL format that is universally accepted and understood by all web browsers and servers while URL decoding is the vice-versa of URL encoding. +``` ## Syntax ``` diff --git a/src/bdscript/useChannel.md b/src/bdscript/useChannel.md index 88fdc67489c..ef269c7654e 100644 --- a/src/bdscript/useChannel.md +++ b/src/bdscript/useChannel.md @@ -7,8 +7,8 @@ Redirects the bot's response message to a different channel. } .discord-messages > .discord-message:before { - color: var(--color1); - background: var(--color3); + color: var(--link-color); + background: var(--card-bg); border-radius: 10px; padding-left: 1rem; padding-right: 1rem; diff --git a/src/bdscript/userBanner.md b/src/bdscript/userBanner.md index 290d2b64048..0245431eb77 100644 --- a/src/bdscript/userBanner.md +++ b/src/bdscript/userBanner.md @@ -4,8 +4,11 @@ Returns user banner if the given user has one. ## Syntax ``` $userBanner[User ID] -``` -> The function is unable to return the user's server banner. +``` + +```admonish fail +The function is unable to return the user's server banner. +``` ### Parameters - `User ID` `(Type: Snowflake || Flag: Required)`: The user to get the banner for. @@ -18,6 +21,8 @@ $sendMessage[$userBanner[$findUser[$message]]?size=4096] ![example](https://user-images.githubusercontent.com/113303649/212497271-e2ebad00-2d78-4bdf-a697-c2863df527e2.png) ![example](https://user-images.githubusercontent.com/113303649/212497313-3824e855-d634-4e8a-848e-975d6d768df3.png) - -> You can use `?size=size` at the end of the banner URL to increase/decrease the image size. Example sizes: 1024, 2048, 4096. -> (e.g. `$image[$userBanner[$findUser[$message]]?size=4096]`) + +```admonish tip title="Image size" +You can use `?size=size` at the end of the banner URL to increase/decrease the image size. Example sizes: 1024, 2048, 4096. +(e.g. `$image[$userBanner[$findUser[$message]]?size=4096]`) +``` diff --git a/src/bdscript/userBannerColor.md b/src/bdscript/userBannerColor.md index 483e623a749..e096b8b523d 100644 --- a/src/bdscript/userBannerColor.md +++ b/src/bdscript/userBannerColor.md @@ -6,6 +6,10 @@ Returns the color of the given user banner. Returns an empty string if no banner $userBannerColor[User ID] ``` +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to test colors! +``` + ### Parameters - `User ID` `(Type: Snowflake || Flag: Required)`: The user to get the banner color from. @@ -35,3 +39,4 @@ $nomention ```admonish question title="What is this?" How [`$authorID`](./authorID.md) works? ``` + diff --git a/src/bdscript/userExists.md b/src/bdscript/userExists.md index dbbf2a0c060..e21832c3b02 100644 --- a/src/bdscript/userExists.md +++ b/src/bdscript/userExists.md @@ -21,9 +21,10 @@ $userExists[$mentioned[1]] color: "#E67E22" content: | !example <@Spen> -- username: BDFD Support - color: "#378afa" - bot: true +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true verified: true content: | true diff --git a/src/bdscript/userID.md b/src/bdscript/userID.md index d1abad3ea29..24df5a60d21 100644 --- a/src/bdscript/userID.md +++ b/src/bdscript/userID.md @@ -12,7 +12,7 @@ $userID[Username#Discriminator / Username] ## Example ``` $nomention -$userID[$username] +$userID[$message] ``` ``` discord yaml @@ -20,16 +20,40 @@ $userID[$username] username: RainbowKey color: "#E67E22" content: | - !example + !example rainbow_key - username: BDFD Support user_id: 1009018156494368798 color: "#378afa" bot: true verified: true content: | - 803569638084313098 + 803569638084313098 +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example kubastick +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true + verified: true + content: | + 390515191819010058 +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example BDFD Support#7678 +- username: BDFD Support + user_id: 1009018156494368798 + color: "#378afa" + bot: true + verified: true + content: | + 1009018156494368798 ``` ```admonish question title="What is this?" -How [`$username`](./username.md) works? +How [`$message`](./message.md) works? ``` diff --git a/src/bdscript/userInfo.md b/src/bdscript/userInfo.md index c7be49c535b..8629f774c5d 100644 --- a/src/bdscript/userInfo.md +++ b/src/bdscript/userInfo.md @@ -36,7 +36,8 @@ Discriminator: {discriminator}] ``` discord yaml - user_id: 803569638084313098 username: RainbowKey - color: "#E67E22" + color: "#E67E22" + highlight: true content: | !example <@RainbowKey> - user_id: 1009018156494368798 diff --git a/src/bdscript/userJoined.md b/src/bdscript/userJoined.md index 4b137280fe0..4bcaf7992bb 100644 --- a/src/bdscript/userJoined.md +++ b/src/bdscript/userJoined.md @@ -5,6 +5,10 @@ Returns the server joining date of a given user. ``` $userJoined[User ID;(Format)] ``` + +```admonish info +Uses GoLang date format. +``` ### Parameters - `User ID` `(Type: Snowflake || Flag: Required)`: The user whose join date will be returned. @@ -13,11 +17,10 @@ $userJoined[User ID;(Format)] > Click [me](../resources/timeFormat.md) to check all supported time format values. ## Example -- Default format - ``` - $nomention - $userJoined[$authorID] - ``` +``` +$nomention +$userJoined[$authorID] +``` ``` discord yaml - user_id: 803569638084313098 @@ -33,14 +36,17 @@ $userJoined[User ID;(Format)] content: | 2022-08-16 ``` + +~~~admonish example -- Custom format - ``` - $nomention - $userJoined[$authorID;January 2, 2006 at 3:04 PM (MST -07:00)] - ``` +Example with custom format: + +``` +$nomention +$userJoined[$authorID;January 2, 2006 at 3:04 PM (MST -07:00)] +``` -``` discord yaml +```discord yaml - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" @@ -54,6 +60,8 @@ $userJoined[User ID;(Format)] content: | August 16, 2022 at 8:39 AM (UTC +00:00) ``` + +~~~ ```admonish question title="What is this?" How [`$authorID`](./authorID.md) works? diff --git a/src/bdscript/userJoinedDiscord.md b/src/bdscript/userJoinedDiscord.md index 8ad63e48e6f..91fb39a3c6e 100644 --- a/src/bdscript/userJoinedDiscord.md +++ b/src/bdscript/userJoinedDiscord.md @@ -2,28 +2,35 @@
Deprecated
- -> As of November 2022, this function has been deprecated in favor of [`$creationDate[]`](./creationDate.md). - -> Besides user IDs, `$userJoinedDiscord[]` can also return the creation date of any valid Discord Snowflake ID. + +```admonish warning +As of November 2022, this function has been deprecated in favor of [`$creationDate[]`](./creationDate.md). +``` Returns the account creation date of a given user. ## Syntax ``` -$userJoinedDiscord[User ID;(Format)] +$userJoinedDiscord[ID;(Format)] ``` + +```admonish info +Uses GoLang date format. +``` + +```admonish tip +Besides user IDs, `$userJoinedDiscord[]` can also return the creation date of any valid Discord Snowflake ID. +``` ### Parameters -- `User ID` `(Type: Snowflake || Flag: Required)`: The user whose account creation date will be returned. +- `ID` `(Type: Snowflake || Flag: Required)`: The user/channel/role/guild/message id whose creation date will be returned. - `Format` `(Type: String || Flag: Optional)`: Customize the default [time format](../resources/timeFormat.md) output. ## Example -- Default format - ``` - $nomention - $userJoinedDiscord[$authorID] - ``` +``` +$nomention +$userJoinedDiscord[$authorID] +``` ``` discord yaml - user_id: 803569638084313098 @@ -39,12 +46,15 @@ $userJoinedDiscord[User ID;(Format)] content: | 2021-01-26 ``` - -- Custom format - ``` - $nomention - $userJoinedDiscord[$authorID;January 2, 2006 at 3:04 PM (MST -07:00)] - ``` + +~~~admonish example + +Example with custom format: + +``` +$nomention +$userJoinedDiscord[$authorID;January 2, 2006 at 3:04 PM (MST -07:00)] +``` ``` discord yaml - user_id: 803569638084313098 @@ -60,6 +70,8 @@ $userJoinedDiscord[User ID;(Format)] content: | January 26, 2021 at 10:18 AM (UTC +00:00) ``` + +~~~ ```admonish question title="What is this?" How [`$authorID`](./authorID.md) works? diff --git a/src/bdscript/username.md b/src/bdscript/username.md index a71a0cee64c..c1922f691f1 100644 --- a/src/bdscript/username.md +++ b/src/bdscript/username.md @@ -13,14 +13,16 @@ Hello $username! ``` ``` discord yaml -- user_id: 696368083517964288 - username: Spen - color: "#b9a0e0" - content: | - !example -- username: Wiki Bot - color: "#b9a0e0" - bot: true - content: | - Hello Spen! +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Hello rainbow_key! ``` diff --git a/src/bdscript/usernameComplex.md b/src/bdscript/usernameComplex.md index 4f1ced81b46..10c9fb61a72 100644 --- a/src/bdscript/usernameComplex.md +++ b/src/bdscript/usernameComplex.md @@ -12,7 +12,7 @@ $username[User ID] ## Example ``` $nomention -$username just hugged $username[$mentioned[1]]! +You just hugged $username[$mentioned[1]] ``` ``` discord yaml @@ -20,16 +20,16 @@ $username just hugged $username[$mentioned[1]]! username: RainbowKey color: "#E67E22" content: | - !example <@MineBartekSA> + !example <@Kuba> - username: BDFD Support user_id: 1009018156494368798 color: "#378afa" bot: true verified: true content: | - RainbowKey just hugged <@MineBartekSA>! + You just hugged kubastick ``` ```admonish question title="What is this?" -How [`$username`](./username.md) and [`$mentioned[]`](./mentioned.md) works? +How [`$mentioned[]`](./mentioned.md) works? ``` diff --git a/src/bdscript/var.md b/src/bdscript/var.md index ddc3f2de938..fa4f550f504 100644 --- a/src/bdscript/var.md +++ b/src/bdscript/var.md @@ -6,7 +6,9 @@ Instead, it creates the variable automatically during it's runtime and gets dele The data stored in the temporary variable can only be retrieved during its execution period and is removed once it's finished. -> 📌 This function can only be used in `BDScript 2` script language. +```admonish danger title="BDScript 2" +Can only be used in **[BDScript 2](../guides/general/bds2/aboutBDScript2.md)**. +``` ## Syntax ``` @@ -16,16 +18,19 @@ $var[Name;(Value)] ### Parameters - `Name` `(Type: String || Flag: Required)`: The name of the temporary variable. - `Value` `(Type: String || Flag: Vacantable)`: The data to store - -> 📌 To retrieve the temporary stored value, type `$var[Name]`, where *"Name"* is the temporary variable name. + +```admonish info +To retrieve the temporary stored value, type `$var[Name]`, where *"Name"* is the temporary variable name. +``` ## Example ``` $nomention -$argsCheck[>1;Type a message!] - $var[ID;$sendMessage[$toLowercase[$message];yes]] - $addButton[no;interactionID;Example;secondary;;;$var[ID]] ``` ![Example](https://user-images.githubusercontent.com/70456337/189480166-d37cbdb8-05ce-44e8-8f2e-14d030baa9a9.png) + +```admonish info title="Read more" +For more information, read the the [Variables Guide](../guides/introduction/variables.md). +``` \ No newline at end of file diff --git a/src/bdscript/varExistError.md b/src/bdscript/varExistError.md index 14ef0a69f36..2e6a906ef10 100644 --- a/src/bdscript/varExistError.md +++ b/src/bdscript/varExistError.md @@ -42,4 +42,8 @@ You are now cool! verified: true content: | You are now cool! +``` + +```admonish info title="Read more" +For more information, read the the [Variables Guide](../guides/introduction/variables.md). ``` diff --git a/src/bdscript/varExists.md b/src/bdscript/varExists.md index a15278341a7..1ab75797d90 100644 --- a/src/bdscript/varExists.md +++ b/src/bdscript/varExists.md @@ -43,4 +43,8 @@ $varExists[$message] ```admonish question title="What is this?" How [`$message`](./message.md) works? +``` + +```admonish info title="Read more" +For more information, read the the [Variables Guide](../guides/introduction/variables.md). ``` diff --git a/src/bdscript/variablesCount.md b/src/bdscript/variablesCount.md index bbe240ddce0..2552d905de7 100644 --- a/src/bdscript/variablesCount.md +++ b/src/bdscript/variablesCount.md @@ -28,4 +28,8 @@ $variablesCount[server] verified: true content: | 4 +``` + +```admonish info title="Read more" +For more information, read the the [Variables Guide](../guides/introduction/variables.md). ``` diff --git a/src/bdscript/voiceUserLimit.md b/src/bdscript/voiceUserLimit.md index 8d469df74bb..b0228c90841 100644 --- a/src/bdscript/voiceUserLimit.md +++ b/src/bdscript/voiceUserLimit.md @@ -12,7 +12,7 @@ $voiceUserLimit[(Voice Channnel ID)] ## Example ``` $nomention -Voice User Limit: $voiceUserLimit[$message] +Voice User Limit: $voiceUserLimit[$mentionedChannels[1]] ``` ``` discord yaml @@ -20,30 +20,35 @@ Voice User Limit: $voiceUserLimit[$message] username: RainbowKey color: "#E67E22" content: | - !example 611281459080331274 + !example <#voice-1> - username: BDFD Support user_id: 1009018156494368798 color: "#378afa" bot: true verified: true content: | - 0 + Voice User Limit: 0 - user_id: 803569638084313098 username: RainbowKey color: "#E67E22" content: | - !example 827255538705236019 + ⬆️ No limits +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example <#general> - username: BDFD Support user_id: 1009018156494368798 color: "#378afa" bot: true verified: true content: | - 99 + Voice User Limit: 99 ``` ```admonish question title="What is this?" -How [`$message`](./message.md) works? +How [`$mentionedChannels[]`](./mentionedChannels.md) works? ``` ```admonish tip diff --git a/src/bdscript/webhookAvatarURL.md b/src/bdscript/webhookAvatarURL.md new file mode 100644 index 00000000000..054934d3a62 --- /dev/null +++ b/src/bdscript/webhookAvatarURL.md @@ -0,0 +1,42 @@ +# $webhookAvatarURL +Changes the webhook's avatar. + +## Syntax +``` +$webhookAvatarURL[Webhook URL;New avatar URL] +``` + +### Parameters +- `Webhook URL` `(Type: URL || Flag: Required)`: The URL of the webhook you want to modify. +- `New avatar URL` `(Type: URL || Flag: Required)`: The new avatar image URL for the webhook. + +## Example +``` +$nomention +$var[webhook;$webhookCreate[$channelID;Test webhook]] +$webhookAvatarURL[$var[webhook];$authorAvatar] +New avatar for webhook! +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + New avatar for webhook! +``` + +```admonish question title="What is this?" +How [`$webhookCreate[]`](./webhookCreate.md), [`$channelID`](./channelID.md), [`$var[]`](./var.md) and [`$authorAvatar`](./authorAvatar.md) works? +``` + +```admonish info title="Read more" +For more information, read the the [Webhooks Guide](../guides/general/webhooks.md). +``` diff --git a/src/bdscript/webhookColor.md b/src/bdscript/webhookColor.md new file mode 100644 index 00000000000..12900841284 --- /dev/null +++ b/src/bdscript/webhookColor.md @@ -0,0 +1,47 @@ +# $webhookColor +Adds color to the webhook. + +## Syntax +``` +$webhookColor[Webhook URL;Color hex] +``` + +### Parameters +- `Webhook URL` `(Type: URL || Flag: Required)`: The URL of the webhook you want to use. +- `Color hex` `(Type: Color || Flag: Required)`: The [color hex](../tools/color.md) to set the embed border color as. You can also use color integer number. +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to select the best color! +``` + +## Example +``` +$nomention +$var[webhook;$webhookCreate[$channelID;Test webhook]] +$webhookColor[$var[webhook];#673ab7] +$webhookDescription[⬅️ Embed border color.] +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 674344467746258975 + username: Test webhook + color: "#fff" + bot: true + verified: false + content: + embed: + description: ⬅️ Embed border color. + color: "#673ab7" +``` + +```admonish question title="What is this?" +How [`$webhookCreate[]`](./webhookCreate.md), [`$webhookDescription[]`](./webhookDescription.md), [`$channelID`](./channelID.md), [`$var[]`](./var.md) works? +``` + +```admonish info title="Read more" +For more information, read the the [Webhooks Guide](../guides/general/webhooks.md). +``` diff --git a/src/bdscript/webhookContent.md b/src/bdscript/webhookContent.md new file mode 100644 index 00000000000..befcaaa319a --- /dev/null +++ b/src/bdscript/webhookContent.md @@ -0,0 +1,41 @@ +# $webhookContent +Adds content to the webhook. + +## Syntax +``` +$webhookContent[Webhook URL;Text] +``` + +### Parameters +- `Webhook URL` `(Type: URL || Flag: Required)`: The URL of the webhook you want to use. +- `Text` `(Type: String || Flag: Required)`: The content text to add to the webhook. + +## Example +``` +$nomention +$var[webhook;$webhookCreate[$channelID;Test webhook]] +$webhookContent[$var[webhook];Hello from my webhook!] +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 674344467746258975 + username: Test webhook + color: "#fff" + bot: true + verified: true + content: | + Hello from my webhook! +``` + +```admonish question title="What is this?" +How [`$webhookCreate[]`](./webhookCreate.md), [`$channelID`](./channelID.md) and [`$var[]`](./var.md) works? +``` + +```admonish info title="Read more" +For more information, read the the [Webhooks Guide](../guides/general/webhooks.md). +``` diff --git a/src/bdscript/webhookCreate.md b/src/bdscript/webhookCreate.md new file mode 100644 index 00000000000..c158dfd255b --- /dev/null +++ b/src/bdscript/webhookCreate.md @@ -0,0 +1,76 @@ +# $webhookCreate +Creates and returns the URL of the newly created webhook. + +```admonish danger +Webhook URLs should be kept private, don't share them! +``` + +```admonish warning title="Limit" +Only 10 webhooks can be created per channel. +``` + +## Syntax +``` +$webhookCreate[Channel ID;Username;(Avatar URL)] +``` + +### Parameters +- `Channel ID` `(Type: Snowflake || Flag: Required)`: The channel in which the webhook will be created. +- `Username` `(Type: String || Flag: Required)`: Name of the webhook that will be displayed in the channel. +- `Avatar URL` `(Type: String || Flag: Vacantable)`: Avatar of the webhook that will be displayed in the channel. + +## Example +``` +$nomention +$webhookCreate[$channelID;BDFD Webhook 🤖] +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + 1234abcd567ABCDEFG890H_654679203GDGJEMFNXH.6479304948 +``` + +```admonish question title="What is this?" +How [`$channelID`](./channelID.md) works? +``` + +~~~admonish tip +You can use [`$var[]`](./var.md) or [other variable functions](../guides/introduction/variables.md) to store the Webhook URL. + +```$nomention +$var[Webhook;$webhookCreate[$channelID;Secret]] +Created and saved! +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Created and saved! +``` + +> How [`$var[]`](./var.md) and [`$channelID`](./channelID.md) works? + +~~~ + +```admonish info title="Read more" +For more information, read the the [Webhooks Guide](../guides/general/webhooks.md). +``` diff --git a/src/bdscript/webhookDelete.md b/src/bdscript/webhookDelete.md new file mode 100644 index 00000000000..b95bcfcc3c7 --- /dev/null +++ b/src/bdscript/webhookDelete.md @@ -0,0 +1,41 @@ +# $webhookDelete +Deletes the webhook. + +## Syntax +``` +$webhookDelete[Webhook URL] +``` + +### Parameters +- `Webhook URL` `(Type: URL || Flag: Required)`: The URL of the webhook you want to delete. + +## Example +``` +$nomention +$var[webhook;$webhookCreate[$channelID;Test webhook]] +$webhookDelete[$var[webhook]] +Deleted! +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Deleted! +``` + +```admonish question title="What is this?" +How [`$webhookCreate[]`](./webhookCreate.md), [`$channelID`](./channelID.md) and [`$var[]`](./var.md) works? +``` + +```admonish info title="Read more" +For more information, read the the [Webhooks Guide](../guides/general/webhooks.md). +``` diff --git a/src/bdscript/webhookDescription.md b/src/bdscript/webhookDescription.md new file mode 100644 index 00000000000..196c1ee133d --- /dev/null +++ b/src/bdscript/webhookDescription.md @@ -0,0 +1,42 @@ +# $webhookDescription +Adds description to the webhook. + +## Syntax +``` +$webhookDescription[Webhook URL;Text] +``` + +### Parameters +- `Webhook URL` `(Type: URL || Flag: Required)`: The URL of the webhook you want to use. +- `Text` `(Type: String || Flag: Required)`: The description text to add to the embed of the webhook. + +## Example +``` +$nomention +$var[webhook;$webhookCreate[$channelID;Test webhook]] +$webhookDescription[$var[webhook];This is a detailed description for my webhook.] +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 887433921657176065 + username: Test webhook + color: "#fff" + bot: true + verified: false + content: + embed: + description: This is a detailed description for my webhook. +``` + +```admonish question title="What is this?" +How [`$webhookCreate[]`](./webhookCreate.md), [`$channelID`](./channelID.md) and [`$var[]`](./var.md) works? +``` + +```admonish info title="Read more" +For more information, read the the [Webhooks Guide](../guides/general/webhooks.md). +``` diff --git a/src/bdscript/webhookFooter.md b/src/bdscript/webhookFooter.md new file mode 100644 index 00000000000..a3c8fde84a1 --- /dev/null +++ b/src/bdscript/webhookFooter.md @@ -0,0 +1,42 @@ +# $webhookFooter +Adds footer to the webhook. + +## Syntax +``` +$webhookFooter[Webhook URL;Text] +``` + +### Parameters +- `Webhook URL` `(Type: URL || Flag: Required)`: The URL of the webhook you want to use. +- `Text` `(Type: String || Flag: Required)`: The footer text to add to the embed of the webhook. + +## Example +``` +$nomention +$var[webhook;$webhookCreate[$channelID;Test webhook]] +$webhookFooter[$var[webhook];Footer Text Here] +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 887433921657176065 + username: Test webhook + color: "#fff" + bot: true + verified: false + embed: + footer: + text: Footer Text Here +``` + +```admonish question title="What is this?" +How [`$webhookCreate[]`](./webhookCreate.md), [`$channelID`](./channelID.md) and [`$var[]`](./var.md) works? +``` + +```admonish info title="Read more" +For more information, read the the [Webhooks Guide](../guides/general/webhooks.md). +``` diff --git a/src/bdscript/webhookSend.md b/src/bdscript/webhookSend.md new file mode 100644 index 00000000000..9677bed1948 --- /dev/null +++ b/src/bdscript/webhookSend.md @@ -0,0 +1,61 @@ +# $webhookSend +Sends message as the webhook. + +## Syntax +``` +$webhookSend[Webhook URL;(Content;Title;Title URL;Description;Color hex;Author;Author icon URL;Footer;Footer icon URL;Thumbnail URL;Image URL;Add timestamp?)] +``` + +### Parameters +- `Webhook URL` `(Type: URL || Flag: Required)`: The URL of the webhook you want to use. +- `Content` `(Type: String || Flag: Vacantable)`: The text that is shown above the embed. +- `Title` `(Type: String || Flag: Vacantable)`: The text that will be used as the title. +- `Title URL` `(Type: URL || Flag: Vacantable)`: The URL that will be applied to the title. +- `Description` `(Type: String || Flag: Vacantable)`: The description that will be applied to the embed. +- `Color hex` `(Type: Color || Flag: Vacantable)`: The [color hex](../tools/color.md) to set the embed border color as. You can also use color integer number. +```admonish tip title="Color Picker" +You can use our ["Color" tool](../tools/color.md) to select the best color! +``` + +- `Author` `(Type: String || Flag: Vacantable )`: The text that appears at the author. +- `Author icon` `(Type: URL || Flag: Vacantable)`: The image that appears next to the author. +- `Footer` `(Type: String || Flag: Vacantable)`: The text to set the footer as. +- `Footer icon` `(Type: URL || Flag: Vacantable)`: The image that appears next to the footer. +- `Thumbnail` `(Type: URL || Flag: Vacantable)`: The image to set as the thumbnail. +- `Image` `(Type: URL || Flag: Vacantable)`: The image that appears above the footer. +- `Add timestamp?` `(Type: Bool || Flag: Vacantable)`: Adds a timestamp to the footer. + +## Example +``` +$nomention +$var[webhook;$webhookCreate[$channelID;Test webhook]] +$webhookSend[$var[webhook];I'm the best webhook;Title;;It's a description!;#673ab7;;;;;;false] +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- username: Test webhook + color: "#fff" + bot: true + verified: true + content: | + I'm the best webhook + embed: + title: Title + description: It's a description! + color: "#673ab7" + footer: + text: Footer Text Here +``` + +```admonish question title="What is this?" +How [`$webhookCreate[]`](./webhookCreate.md), [`$channelID`](./channelID.md) and [`$var[]`](./var.md) works? +``` + +```admonish info title="Read more" +For more information, read the the [Webhooks Guide](../guides/general/webhooks.md). +``` diff --git a/src/bdscript/webhookTitle.md b/src/bdscript/webhookTitle.md new file mode 100644 index 00000000000..a79b02c01fe --- /dev/null +++ b/src/bdscript/webhookTitle.md @@ -0,0 +1,42 @@ +# $webhookTitle +Adds title to the webhook. + +## Syntax +``` +$webhookTitle[Webhook URL;Text] +``` + +### Parameters +- `Webhook URL` `(Type: URL || Flag: Required)`: The URL of the webhook you want to use. +- `Text` `(Type: String || Flag: Required)`: The title text to add to the embed of the webhook. + +## Example +``` +$nomention +$var[webhook;$webhookCreate[$channelID;Test webhook]] +$webhookTitle[$var[webhook];My Webhook Title] +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 674344467746258975 + username: Test webhook + color: "#fff" + bot: true + verified: false + content: | + embed: + title: My Webhook Title +``` + +```admonish question title="What is this?" +How [`$webhookCreate[]`](./webhookCreate.md), [`$channelID`](./channelID.md) and [`$var[]`](./var.md) works? +``` + +```admonish info title="Read more" +For more information, read the the [Webhooks Guide](../guides/general/webhooks.md). +``` diff --git a/src/bdscript/webhookUsername.md b/src/bdscript/webhookUsername.md new file mode 100644 index 00000000000..26cf502548c --- /dev/null +++ b/src/bdscript/webhookUsername.md @@ -0,0 +1,42 @@ +# $webhookUsername +Changes the webhook's username. + +## Syntax +``` +$webhookUsername[Webhook URL;New username] +``` + +### Parameters +- `Webhook URL` `(Type: URL || Flag: Required)`: The URL of the webhook you want to modify. +- `New username` `(Type: String || Flag: Required)`: The new username for the webhook. + +## Example +``` +$nomention +$var[webhook;$webhookCreate[$channelID;Test webhook]] +$webhookUsername[$var[webhook];BDFD Support] +New username for webhook! +``` + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + New username for webhook! +``` + +```admonish question title="What is this?" +How [`$webhookCreate[]`](./webhookCreate.md), [`$channelID`](./channelID.md) and [`$var[]`](./var.md) works? +``` + +```admonish info title="Read more" +For more information, read the the [Webhooks Guide](../guides/general/webhooks.md). +``` diff --git a/src/callbacks/onInteraction.md b/src/callbacks/onInteraction.md index 4e12ddc4ac2..aa940aa7666 100644 --- a/src/callbacks/onInteraction.md +++ b/src/callbacks/onInteraction.md @@ -111,4 +111,6 @@ $endif I can't use the button ``` -> How does [`$if[]`](../guides/general/ifStatements.md) and [`$customID[]`](../bdscript/customID.md) work? \ No newline at end of file +```admonish question title="What is this?" +How [`$if[]`](../bdscript/if.md) and [`$customID[]`](../bdscript/customID.md) work? +``` \ No newline at end of file diff --git a/src/callbacks/onInteractionComplex.md b/src/callbacks/onInteractionComplex.md index 61eec49c0f3..1b7eb1c78f4 100644 --- a/src/callbacks/onInteractionComplex.md +++ b/src/callbacks/onInteractionComplex.md @@ -61,4 +61,6 @@ $onInteraction[Interaction ID] Hello Nicky! ``` -> How [`$addButton[]`](../bdscript/addButton.md) works? +```admonish question title="What is this?" +How [`$addButton[]`](../bdscript/addButton.md) works? +``` diff --git a/src/flowchart/addResponseEmbed.md b/src/flowchart/addResponseEmbed.md index 71ed17b94f1..4d46ddd4d5c 100644 --- a/src/flowchart/addResponseEmbed.md +++ b/src/flowchart/addResponseEmbed.md @@ -24,8 +24,8 @@ Entry Point ➤ - ➤ Add response embed (Title: `Meowing Title`, Description: ` color: "#748bd4" bot: true command: - user_id: 713752533763489893 - author: Fai-Kun + user_id: 803569638084313098 + author: RainbowKey command: /example color: "#E67E22" content: "" diff --git a/src/foreword.md b/src/foreword.md index c7453511820..9cec3cd07e0 100644 --- a/src/foreword.md +++ b/src/foreword.md @@ -2,7 +2,7 @@

Bot Designer For Discord

-

Build powerful Discord bots without coding experience.

+

Build powerful Discord bots without coding experience.

Sends a notification to your mobile phone. + +```admonish warning title="Limit" +Can be used every 20 minutes. +``` + +```admonish warning title="Limit" +Only for Android. Can't be used on iOS. +``` ## Syntax ``` @@ -17,7 +25,11 @@ $sendNotification[Message;(Image URL)] ## Example ``` $nomention -$sendNotification[Hello, I miss you!;$userAvatar[$botID]] +$sendNotification[Hello world!;$authorAvatar] ``` -![example](https://i.imgur.com/yfSTLVY.png) +![example](https://i.imgur.com/yfSTLVY.png) + +```admonish question title="What is this?" +How [`$authorAvatar`](../bdscript/authorAvatar.md) works? +``` diff --git a/src/premium/suppressErrorLogging.md b/src/premium/suppressErrorLogging.md index 18c0e76718f..cc022acaad4 100644 --- a/src/premium/suppressErrorLogging.md +++ b/src/premium/suppressErrorLogging.md @@ -39,6 +39,10 @@ $suppressErrorLogging - Without `$suppressErrorLogging`:\ ![example](https://github.com/user-attachments/assets/245a7bc3-5efa-4d01-86d3-f57b46e93db2) +```admonish question title="What is this?" +How [`$createChannel[]`](../bdscript/createChannel.md) works? +``` + ```admonish tip You can use [`$suppressErrors`](../bdscript/suppressErrors.md) to disable error bot response. ``` diff --git a/src/premium/usedEmoji.md b/src/premium/usedEmoji.md index 8fb2c736029..da991b24de0 100644 --- a/src/premium/usedEmoji.md +++ b/src/premium/usedEmoji.md @@ -4,8 +4,10 @@
This function returns the emoji which triggered a [`$reaction[]`](./reaction.md) callback. - -> This function can only be used inside a `$reaction[]` callback. + +```admonish warning +This function can only be used inside a [`$reaction[]`](./reaction.md) callback. +``` ## Syntax ``` @@ -48,5 +50,11 @@ $sendMessage[Emoji: $usedEmoji] content: | Emoji: ✅ ``` - -> For more info, see the [Awaited Reactions Guide](./awaitedReactions.md). + +```admonish question title="What is this?" +How [`$sendMessage[]`](../bdscript/sendMessage.md) works? +``` + +```admonish info title="Read more" +For more information, read the the [Awaited Reactions Guide](./awaitedReactions.md). +``` \ No newline at end of file diff --git a/src/resources/api.md b/src/resources/api.md index 9c44c097ca2..2993765867c 100644 --- a/src/resources/api.md +++ b/src/resources/api.md @@ -6,24 +6,24 @@ summary { background: hsl(0deg 0% 100% / 5%) !important; } -.mainAPI { - position: relative; - background-color: var(--color3); - border-radius: 10px; - padding-bottom: 1.5rem; - padding-left: 15px; - padding-right: 15px; - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3); - transition: .3s; +.mainAPI, .endpoint { + background: var(--card-bg); + border-radius: var(--border-radius); + border: 1px solid rgba(255, 255, 255, 0.05); + margin-top: 1.5rem; + padding-bottom: 0rem; + padding-left: 1.5rem; + padding-right: 1.5rem; + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3); } .mainAPI h2 { - padding-top: 1rem; - margin-top: 1rem; + padding-top: 1rem !important; + margin-top: 0rem !important; } .mainAPI code { - color: var(--color1) !important; + color: var(--link-color) !important; } .wrap-button, @@ -31,37 +31,15 @@ summary { visibility: hidden; } -.endpoint { - box-shadow: 0 12px 15px rgba(0, 0, 0, 0.3); - position: relative; - background: var(--color3); - border-radius: 10px; - padding-left: 15px; - padding-right: 15px; - padding-bottom: 1.25rem; - margin-top: -1rem; - transition: .3s; -} - .endpoint h3 { - padding-top: 1rem; + margin-top: 1.5rem !important; + padding-top: 0rem !important; } .endpoint #GET { - background: var(--color2); + background: var(--link-color); padding: .25rem; border-radius: 10px; - transition: .3s; -} - -.endpoint:hover { - transform: scale(1.01); - transition: .3s; -} - -.endpoint:hover #GET { - border-radius: 7px; - transition: .3s; } @@ -287,3 +265,5 @@ Possible argument types: - `URL` - `Enum` - `Tuple` + + diff --git a/src/resources/discordTimestamps.md b/src/resources/discordTimestamps.md index 0355c9c3651..aa2b48782a8 100644 --- a/src/resources/discordTimestamps.md +++ b/src/resources/discordTimestamps.md @@ -1,6 +1,10 @@ # Discord Timestamps Discord timestamps are used to provide time in multiple formats. The information is given according to the user's timezone and locale. Discord timestamps are built with the Unix Time system, meaning that they are dynamic. These can be used by anyone; This includes users, webhooks, and applications. +```admonish tip title="Timestamp Converter" +You can use our ["Timestamp Converter" tool](../tools/timestamp.md) to work with unixtime! +``` + ## Syntax Timestamp syntax: `` @@ -23,9 +27,14 @@ The default style is `f`, if no style provided. ## Usability Functions which return UNIX timestamp: -- [`$getTimestamp`](../bdscript/getTimestamp.md) -- [`$hostingExpireTime`](../bdscript/hostingExpireTime.md) -- [`$premiumExpireTime`](../bdscript/premiumExpireTime.md) +- [`$getEmbedData[]`](../getEmbedData.md) +- [`$getTimestamp`](../getTimestamp.md) +- [`$getTimestamp[]`](../getTimestampComplex.md) +- [`$hostingExpireTime`](../hostingExpireTime.md) +- [`$hostingExpireTime[]`](../hostingExpireTimeComplex.md) +- [`$lastPinTimestamp`](../lastPinTimestamp.md) +- [`$messageEditedTimestamp[]`](../messageEditedTimestamp.md) +- [`$premiumExpireTime`](../premiumExpireTime.md) ### Example ``` @@ -33,3 +42,4 @@ $nomention ``` ![image](https://user-images.githubusercontent.com/113247745/199022364-84ebdc91-4259-4f1f-9299-832784349db4.png) + diff --git a/src/resources/timeFormat.md b/src/resources/timeFormat.md index be2e94f9fef..a5af41e10eb 100644 --- a/src/resources/timeFormat.md +++ b/src/resources/timeFormat.md @@ -1,5 +1,5 @@ # Time Format -Custom time formatting values for [`$creationDate`](../bdscript/creationDate.md), [`$userJoinedDiscord`](../bdscript/userJoinedDiscord.md), and [`$userJoined`](../bdscript/userJoined.md) functions. +Custom time formatting values for [`$creationDate[]`](../bdscript/creationDate.md), [`$userJoinedDiscord[]`](../bdscript/userJoinedDiscord.md) and [`$userJoined[]`](../bdscript/userJoined.md) functions. ### Time Formats List of supported time format values : diff --git a/src/settings.md b/src/settings.md index 9e130adcd6b..84f73461c17 100644 --- a/src/settings.md +++ b/src/settings.md @@ -13,7 +13,6 @@ Let's customize your experience in our Bot Designer For Discord wiki world! -

Text Size

Easily modify the size of text for optimal viewing and readability.

@@ -44,15 +43,6 @@ Let's customize your experience in our Bot Designer For Discord wiki world!
-
-

Folders (Soon...)

-

Folders make it easier to find the functions you need.

-
- -
-

"Enable" (Disabled)

-
-

Effects

It's only decoration for wiki.

@@ -176,9 +166,9 @@ Let's customize your experience in our Bot Designer For Discord wiki world! - +
-

0 / 10000

+

0 / 25000

``` diff --git a/src/terms.md b/src/terms.md index 0c46403229a..ec433d480f4 100644 --- a/src/terms.md +++ b/src/terms.md @@ -1,11 +1,7 @@ - - -# Terms of Service - -The Terms of Service for Bot Designer for Discord can be found at: - -**** + + +Redirectig to https://botdesignerdiscord.com/tos diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css index 6236df43d5b..786e24a6261 100644 --- a/src/theme/css/chrome.css +++ b/src/theme/css/chrome.css @@ -1267,6 +1267,21 @@ ul#searchresults span.teaser em { background: rgba(255, 255, 255, 0.06); } +.functions-section + li .section li.chapter-item > div:first-child { + user-select: none; + width: 100%; + -webkit-user-select: none; + border-radius: 10px; + padding: .2rem 1rem .2rem 1rem; + margin-bottom: .5rem; + background: rgba(255, 255, 255, 0.03); + border: 1px solid rgba(255, 255, 255, 0.04); + cursor: pointer; +} + +.functions-section + li .section li.chapter-item > div:first-child:hover { + background: rgba(255, 255, 255, 0.06); +} /* Deprecated function tag */ /* $ <- ITS IMPORTANT! */ @@ -1493,3 +1508,7 @@ ul#searchresults span.teaser em { font-size: 1rem; } } + + + + diff --git a/src/theme/css/home.css b/src/theme/css/home.css index 84c9ae9a15f..572c3a88322 100644 --- a/src/theme/css/home.css +++ b/src/theme/css/home.css @@ -37,6 +37,10 @@ box-shadow: 0 12px 15px rgba(0, 0, 0, 0.3); } +#bdfd-about { + padding: 1rem; +} + .download, .resources { text-align: center; @@ -202,3 +206,4 @@ button a { min-height: auto; } } + diff --git a/src/theme/css/wiki-themes/discord-messages.css b/src/theme/css/wiki-themes/discord-messages.css index 39a32738e5e..b9b486b455c 100644 --- a/src/theme/css/wiki-themes/discord-messages.css +++ b/src/theme/css/wiki-themes/discord-messages.css @@ -50,7 +50,7 @@ text-transform: uppercase; display: flex; align-items: center; - height: 0.9375rem; + height: 2rem; padding: 0 0.275rem; margin-top: 0.075em; border-radius: 4px; @@ -269,3 +269,4 @@ .discord-message [id$="-mark"] { line-height: 19px; } + diff --git a/src/theme/index.hbs b/src/theme/index.hbs index 5f4ea310575..a9c967d19ab 100644 --- a/src/theme/index.hbs +++ b/src/theme/index.hbs @@ -136,7 +136,7 @@ - BDFD Wiki Logo + BDFD Wiki Logo BDFD Wiki @@ -341,4 +341,4 @@ - \ No newline at end of file + diff --git a/src/theme/livetime.js b/src/theme/livetime.js index a6f505d3d35..fc0c9f31052 100644 --- a/src/theme/livetime.js +++ b/src/theme/livetime.js @@ -1,79 +1,81 @@ -document.addEventListener("DOMContentLoaded", function () { - var day = new Date().getDate(); - var time = new Date().getTime(); - var second = new Date().getSeconds(); - var minute = new Date().getMinutes(); - var hour = new Date().getHours(); - var year = new Date().getFullYear(); - var month = new Date().toLocaleString("en", { month: "long" }); - var formattedDate = new Date().toISOString().slice(0, 10); - - var dayElement = document.getElementById("day-mark"); - if (dayElement) { - dayElement.innerHTML = "Current Day: " + day; - } - - var unixElement = document.getElementById("unix-mark"); - if (unixElement) { - unixElement.innerHTML = "Current Unix-time: " + time; - } - - var moreUnixElement = document.getElementById("moreunix-mark"); - if (moreUnixElement) { - moreUnixElement.innerHTML = `Unix Timestamp
-In Seconds - ${time}
-In Milliseconds - ${time * 1000}
-In Nanoseconds - ${time * 1000000000}`; - } - - var secondElement = document.getElementById("second-mark"); - if (secondElement) { - secondElement.innerHTML = "Current Second: " + second; - } - - var minuteElement = document.getElementById("minute-mark"); - if (minuteElement) { - minuteElement.innerHTML = "Current Minute: " + minute; - } - - var hourElement = document.getElementById("hour-mark"); - if (hourElement) { - hourElement.innerHTML = "Current Hour: " + hour; - } - - var yearElement = document.getElementById("year-mark"); - if (yearElement) { - yearElement.innerHTML = "Current Year: " + year; - } - - var monthElement = document.getElementById("month-mark"); - if (monthElement) { - monthElement.innerHTML = "Current Month: " + month; - } - - var dateElement = document.getElementById("date-mark"); - if (dateElement) { - dateElement.innerHTML = "Current Date: " + formattedDate; - } - - function getFormattedTime(timezone) { - const date = new Date(); - const options = { - hour: "2-digit", - minute: "2-digit", - hour12: false, - timeZone: timezone, - }; - return date.toLocaleTimeString("en-US", options); - } - - var timeElement = document.getElementById("time-mark"); - if (timeElement) { - timeElement.innerHTML = `New York Time: ${ - getFormattedTime("America/New_York").split(",")[0] - }, ${new Date().getDate()} -
Moscow Time: ${ - getFormattedTime("Europe/Moscow").split(",")[0] - }, ${new Date().getDate()}`; - } -}); +document.addEventListener("DOMContentLoaded", function () { + var now = new Date(); + var day = now.getUTCDate(); + var time = now.getTime(); + var second = now.getUTCSeconds(); + var minute = now.getUTCMinutes(); + var hour = now.getUTCHours(); + var year = now.getUTCFullYear(); + var month = now.toLocaleString("en", { month: "long", timeZone: "UTC" }); + var formattedDate = now.toISOString().slice(0, 10); + var unixTimeMs = now.getTime(); + var unixTimeSec = Math.floor(unixTimeMs / 1000); + + var dayElement = document.getElementById("day-mark"); + if (dayElement) { + dayElement.innerHTML = "Current Day: " + day; + } + + var unixElement = document.getElementById("unix-mark"); + if (unixElement) { + unixElement.innerHTML = "Current Unix-time: " + unixTimeSec; + } + + var moreUnixElement = document.getElementById("moreunix-mark"); + if (moreUnixElement) { + moreUnixElement.innerHTML = `Unix Timestamp
+In Seconds - ${unixTimeSec}
+In Milliseconds - ${unixTimeMs}
+In Nanoseconds - ${unixTimeMs * 1000000}`; + } + + var secondElement = document.getElementById("second-mark"); + if (secondElement) { + secondElement.innerHTML = "Current Second: " + second; + } + + var minuteElement = document.getElementById("minute-mark"); + if (minuteElement) { + minuteElement.innerHTML = "Current Minute: " + minute; + } + + var hourElement = document.getElementById("hour-mark"); + if (hourElement) { + hourElement.innerHTML = "Current Hour: " + hour; + } + + var yearElement = document.getElementById("year-mark"); + if (yearElement) { + yearElement.innerHTML = "Current Year: " + year; + } + + var monthElement = document.getElementById("month-mark"); + if (monthElement) { + monthElement.innerHTML = "Current Month: " + month; + } + + var dateElement = document.getElementById("date-mark"); + if (dateElement) { + dateElement.innerHTML = "Current Date: " + formattedDate; + } + + function getFormattedTime(timezone) { + const date = new Date(); + const options = { + hour: "2-digit", + minute: "2-digit", + hour12: false, + timeZone: timezone, + }; + return date.toLocaleTimeString("en-US", options); + } + + var timeElement = document.getElementById("time-mark"); + if (timeElement) { + var utcTime = getFormattedTime("UTC"); + var moscowTime = getFormattedTime("Europe/Moscow"); + var utcDay = now.getUTCDate(); + + timeElement.innerHTML = `New York Time: ${utcTime}, ${utcDay}
Moscow Time: ${moscowTime}, ${utcDay}`; + } +}); \ No newline at end of file diff --git a/src/theme/playground.js b/src/theme/playground.js index f1dbe578338..ae7d5f58f5d 100644 --- a/src/theme/playground.js +++ b/src/theme/playground.js @@ -180,3 +180,669 @@ function editInputHeight() { } } +// Editor tools +function updateStats() { + const text = document.getElementById("editor").value; + + const words = text.trim().split(/\s+/).filter(word => word !== ""); + const wordCount = words.length; + + let spaceCount = 0; + for (let i = 0; i < text.length; i++) { + if (text[i] === ' ') { + spaceCount++; + } + } + + const lineCount = text.split('\n').length; + const charCount = text.length; + const byteCount = new TextEncoder().encode(text).length; + const escapes = ["%{DOL}%", "%ESCAPED%", "\\]", "\\;", "%{-SEMICOL-}%"]; + let escapesCount = 0; + escapes.forEach(escape => { + let count = 0; + let position = text.indexOf(escape); + while (position !== -1) { + count++; + position = text.indexOf(escape, position + escape.length); + } + escapesCount += count; + }); + + const specialChars = text.replace(/[\w\s]/g, "").length; + + document.getElementById("wordCount").textContent = wordCount; + document.getElementById("spaceCount").textContent = spaceCount; + document.getElementById("lineCount").textContent = lineCount; + document.getElementById("charCount").textContent = charCount; + document.getElementById("byteCount").textContent = byteCount; + document.getElementById("escapesCount").textContent = escapesCount; + document.getElementById("specialChars").textContent = specialChars; +} + +function replaceText() { + const searchText = document.getElementById("searchText").value; + const replaceText = document.getElementById("replaceText").value; + const editor = document.getElementById("editor"); + + try { + const regex = new RegExp(searchText, 'g'); + editor.value = editor.value.replace(regex, replaceText); + } catch (e) { + const escapedSearchText = searchText.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + editor.value = editor.value.replaceAll(escapedSearchText, replaceText); + } + + updateStats(); + checkBrackets(); +} + +function replaceOneText() { + const searchText = document.getElementById("searchText").value; + const replaceText = document.getElementById("replaceText").value; + const editor = document.getElementById("editor"); + + try { + const regex = new RegExp(searchText); + editor.value = editor.value.replace(regex, replaceText); + } catch (e) { + const escapedSearchText = searchText.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + editor.value = editor.value.replace(escapedSearchText, replaceText); + } + + updateStats(); + checkBrackets(); +} + + +let showWarnings = true; +let showErrors = true; + +function editorWarning() { + showWarnings = !showWarnings; + + callButtonChange('changeWarningsButton', showWarnings); + updateErrorVisibility(); +} + +function editorError() { + showErrors = !showErrors; + + callButtonChange('changeErrorsButton', showErrors); + updateErrorVisibility(); +} + +function updateErrorVisibility() { + const errorMessageElement = document.getElementById("error-message"); + const errorDivs = errorMessageElement.children; + + for (let i = 0; i < errorDivs.length; i++) { + const errorDiv = errorDivs[i]; + + if (errorDiv.style && errorDiv.style.color) { + const isWarning = errorDiv.style.color === "orange"; + const isError = errorDiv.style.color === "red"; + + if (isWarning) { + errorDiv.style.display = showWarnings ? "block" : "none"; + } + + if (isError) { + errorDiv.style.display = showErrors ? "block" : "none"; + } + } + } +} + +function callError(message, type = 'error', unique = false) { + const errorMessageElement = document.getElementById("error-message"); + + if (unique) { + for (let i = 0; i < errorMessageElement.children.length; i++) { + if (errorMessageElement.children[i].textContent.startsWith(message)) { + return; + } + } + } + + let closeAllButton = document.getElementById('close-all-errors-btn'); + const errorDiv = document.createElement("div"); + errorDiv.style.display = "block"; + + if (type === 'warn') { + errorDiv.style.color = "orange"; + } else { + errorDiv.style.color = "red"; + } + + errorDiv.innerHTML = `${message} ×`; + errorMessageElement.appendChild(errorDiv); + + if (closeAllButton) { + errorMessageElement.appendChild(closeAllButton); + } + + const closeBtn = errorDiv.querySelector('.close-btn'); + closeBtn.addEventListener('click', function() { + errorDiv.remove(); + }); + + updateErrorVisibility(); +} + +function deleteError(message) { + const errorMessageElement = document.getElementById("error-message"); + + for (let i = errorMessageElement.children.length - 1; i >= 0; i--) { + const child = errorMessageElement.children[i]; + + if (child.tagName === 'DIV' && child.textContent.startsWith(message)) { + child.remove(); + } + } + updateCloseAllButton(); +} + +function updateCloseAllButton() { + let closeAllButton = document.getElementById('close-all-errors-btn'); + const errorMessageElement = document.getElementById("error-message"); + const errorCount = errorMessageElement.children.length - (closeAllButton ? 1 : 0); + const closeAllButtonId = 'close-all-errors-btn'; + + if (errorCount > 3) { + if (!closeAllButton) { + closeAllButton = document.createElement('button'); + closeAllButton.id = closeAllButtonId; + closeAllButton.textContent = `Close all ${errorCount} notifications`; + + closeAllButton.addEventListener('click', () => { + while (errorMessageElement.firstChild) { + errorMessageElement.removeChild(errorMessageElement.firstChild); + } + }); + errorMessageElement.appendChild(closeAllButton); + } else { + closeAllButton.textContent = `Close all ${errorCount} notifications`; + } + } else if (closeAllButton) { + closeAllButton.remove(); + } +} + +function checkBrackets() { + const text = document.getElementById("editor").value; + const textBytes = new TextEncoder().encode(text).length; + let dollarCount = 0; + let openBrackets = 0; + let closeBrackets = 0; + let lastOpenBracketLine = -1; + + const errorMessageElement = document.getElementById("error-message"); + errorMessageElement.innerHTML = ""; + errorMessageElement.style.color = "black"; + + if (textBytes > 65536) { + callError("Error: Text exceeds allowed size (65536 bytes)."); + } + + if (text.indexOf('$') === -1 && text.length > 2000) { + callError("Warning: Character limit exceeded (2000) for messages without functions.", 'warn'); + } + + const lines = text.split('\n'); + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; + for (let j = 0; j < line.length; j++) { + if (line[j] === '$') { + if (j + 1 < line.length && /[a-zA-Z]/.test(line[j + 1])) { + dollarCount++; + } + } else if (line[j] === '[') { + openBrackets++; + lastOpenBracketLine = i + 1; + if (j + 1 < line.length && line[j + 1] === ']') { + if (openBrackets <= dollarCount) { + callError(`Warning: Empty brackets [] detected on line ${i + 1}.`, 'warn'); + } + } + } else if (line[j] === ']' && (j === 0 || line[j - 1] !== '\\')) { + closeBrackets++; + } + } + } + + document.getElementById("openCount").textContent = openBrackets; + document.getElementById("closeCount").textContent = closeBrackets; + + if (openBrackets <= dollarCount) { + if (closeBrackets < openBrackets) { + callError(`Error: Not all open brackets are closed. Last opened on line ${lastOpenBracketLine}.`); + } + } +} + +let caseSensitive = false; +let highlightEnabled = true; +let lineNumberingEnabled = true; + +function editorFindCase() { + caseSensitive = !caseSensitive; + callButtonChange('caseSensitiveButton', caseSensitive); + toggleHighlight(); +} + +function toggleHighlight() { + const highlightedTextDiv = document.getElementById("highlightedText"); + const text = document.getElementById("editor").value; + const searchText = document.getElementById("searchText").value; + let highlighted = text; + let matches = 0; + + if (searchText) { + try { + const flags = caseSensitive ? 'g' : 'gi'; + const regex = new RegExp(searchText, flags); + + highlighted = text.replace(regex, (match) => { + matches++; + return `${match}`; + }); + } catch (e) { + const escapedSearchText = searchText.replace(/[.*+?^${}()|[\\]\\\]/g, '\\$&'); + const flags = caseSensitive ? 'g' : 'gi'; + const regex = new RegExp(escapedSearchText, flags); + + highlighted = text.replace(regex, (match) => { + matches++; + return `${match}`; + }); + } + } + + if (highlightEnabled) { + // Channel & User mentions + const mentionRegex = /<@(.*?)>/g; + highlighted = highlighted.replace(mentionRegex, (match, content) => { + return `@${content}`; + }); + + const channelRegex = /<#(.*?)>/g; + highlighted = highlighted.replace(channelRegex, (match, content) => { + return `#${content}`; + }); + + // ** + const boldRegex = /\*\*(.*?)\*\*/g; + highlighted = highlighted.replace(boldRegex, (match, content) => { + return `${content}`; + }); + + // * + const italicRegex = /\*(.*?)\*/g; + highlighted = highlighted.replace(italicRegex, (match, content) => { + return `${content}`; + }); + + // ~~ + const delRegex = /~~(.*?)~~/g; + highlighted = highlighted.replace(delRegex, (match, content) => { + return `${content}`; + }); + + // __ + const underRegex = /__(.*?)__/g; + highlighted = highlighted.replace(underRegex, (match, content) => { + return `${content}`; + }); + + // ``` + const hgbCodeRegex = /```(.*?)```/g; + highlighted = highlighted.replace(hgbCodeRegex, (match, content) => { + return `${content}`; + }); + + // ` + const hgsCodeRegex = /`(.*?)`/g; + highlighted = highlighted.replace(hgsCodeRegex, (match, content) => { + return `${content}`; + }); + + // || + const spoilerRegex = /\|\|(.*?)\|\|/g; + highlighted = highlighted.replace(spoilerRegex, (match, content) => { + return `${content}`; + }); + + const highlightedText = document.getElementById('highlightedText'); + + if (highlightedText) { + highlightedText.innerHTML = highlighted; + + highlightedText.addEventListener('click', (event) => { + if (event.target.tagName === 'SPOILER') { + event.target.classList.add('spoiler-active'); + } + }); + } + + // Unixtime + const timestampRegex = //g; + highlighted = highlighted.replace(timestampRegex, (match, timestamp, format) => { + const date = new Date(parseInt(timestamp) * 1000); + let formattedDate = ""; + + switch (format) { + case 't': formattedDate = date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); break; + case 'T': formattedDate = date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit' }); break; + case 'd': formattedDate = date.toLocaleDateString(); break; + case 'D': formattedDate = date.toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' }); break; + case 'f': formattedDate = date.toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' }) + " " + date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); break; + case 'F': formattedDate = date.toLocaleDateString(undefined, { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }) + " " + date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); break; + case 'R': formattedDate = getRelativeTime(date); break; + default: formattedDate = "Invalid format"; + } + return `${formattedDate}`; + }); + + // Headers + highlighted = highlighted.replace(/^# (.*)$/gm, '

$1

'); + highlighted = highlighted.replace(/^## (.*)$/gm, '

$1

'); + highlighted = highlighted.replace(/^### (.*)$/gm, '

$1

'); + } + + // > + const quoteRegex = /^> (.*)$/gm; + highlighted = highlighted.replace(quoteRegex, (match, content) => { + return `${content}`; + }); + + // Link + const linkRegex = /(https?:\/\/[^\s]+)/g; + highlighted = highlighted.replace(linkRegex, (url) => { + return `${url}`; + }); + + // Lines + const lines = highlighted.split('\n'); + let numberedText = ""; + if (lineNumberingEnabled) { + for (let i = 0; i < lines.length; i++) { + numberedText += `${i + 1} ${lines[i]}
`; + } + } else { + for (let i = 0; i < lines.length; i++) { + numberedText += `${lines[i]}
`; + } + } + + const resultsString = `

Results: ${matches}

`; + highlightedTextDiv.innerHTML = resultsString + numberedText; +} + +function textHighlighting() { + highlightEnabled = !highlightEnabled; + callButtonChange('findHighlightingButton', highlightEnabled); + toggleHighlight(); +} + +function changeCodeLines() { + lineNumberingEnabled = !lineNumberingEnabled; + callButtonChange('changeCodeLines', lineNumberingEnabled); + toggleHighlight(); +} + + +function getRelativeTime(date) { + const now = new Date(); + const diffInSeconds = Math.round((date - now) / 1000); + + const intervals = { + 'year': 31536000, + 'month': 2592000, + 'day': 86400, + 'hour': 3600, + 'minute': 60, + 'second': 1 + }; + + const isFuture = diffInSeconds > 0; + + let prefix = isFuture ? 'in ' : ''; + let suffix = isFuture ? '' : ' ago'; + + let absDiffInSeconds = Math.abs(diffInSeconds); + + for (const interval in intervals) { + const secondsInInterval = intervals[interval]; + const quantity = Math.floor(absDiffInSeconds / secondsInInterval); + + if (quantity >= 1) { + return prefix + quantity + ' ' + interval + (quantity > 1 ? 's' : '') + suffix; + } + } + + return isFuture ? 'Soon' : 'Just now'; +} + +function copyCodeText() { + const textarea = document.getElementById("editor"); + + if (!textarea) { + console.error("Textarea element with ID 'editor' not found."); + return; + } + + const code = textarea.value; + + navigator.clipboard.writeText(code) + .then(() => { + console.log("Copied"); + }) + .catch(err => { + console.error("Invalid object to be copied: ", err); + }); +} + + +function saveFile() { + const fileName = document.getElementById('name').value; + const finalFileName = fileName || "bdfdwikieditor"; + const fileContent = document.getElementById('editor').value; + + const blob = new Blob([fileContent], { type: 'text/plain' }); + const a = document.createElement('a'); + const url = URL.createObjectURL(blob); + + a.href = url; + a.download = finalFileName + '.txt'; + + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + + URL.revokeObjectURL(url); +} + +function nameScript() { + const textarea = document.getElementById('name'); + const count = textarea.parentNode.querySelector('span'); + + textarea.value = textarea.value.replace(/[\r\n]+/g, ''); + + if (textarea.value.length > 50) { + textarea.value = textarea.value.substring(0, 50); + } + + count.textContent = textarea.value.length + '/50'; + + if (textarea.value.length >= 50) { + count.style.color = 'red'; + } else { + count.style.color = ''; + } +} + +function typeScript() { + const nameInputVal = document.getElementById('name')?.value || ''; + const selectValue = document.querySelector('select[name="type"]')?.value || ''; + const nameLabel = document.getElementById('scriptType'); + + const errorMessages = { + empty: "Error: Name cannot be empty.", + regex: "Error: Slash command name must contain only English letters.", + length: "Error: Slash command name exceeds 32 characters.", + invalidCallback: "Error: Invalid callback name.", + slashStart: "Error: Slash command name must start with /" + }; + + deleteError(errorMessages.regex); + deleteError(errorMessages.empty); + deleteError(errorMessages.length); + deleteError(errorMessages.invalidCallback); + deleteError(errorMessages.slashStart); + + const callbackKeywords = ['$awaitedCommand', '$awaitedCommandError', '$onJoined', '$onLeave', '$onBanAdd', '$onBanRemove', '$onMessageDelete', '$onInteraction', '$alwaysReply', '$messageContains', '$reaction']; + + if (selectValue !== 'file') { + if (!nameInputVal) { + callError(errorMessages.empty, 'error', true); + } else { + deleteError(errorMessages.empty); + } + } else { + deleteError(errorMessages.empty); + } + + let commandType = 'Command'; + + if (selectValue === 'file') { + commandType = ' • File'; + } else if (selectValue === 'callback') { + commandType = ' • Callback'; + if (!callbackKeywords.some(keyword => nameInputVal.startsWith(keyword))) { + callError(errorMessages.invalidCallback, 'error', true); + } else { + deleteError(errorMessages.invalidCallback); + } + } else if (selectValue === 'slash') { + commandType = ' • Slash Command'; + + if (!nameInputVal.startsWith('/')) { + callError(errorMessages.slashStart, 'error', true); + } else { + deleteError(errorMessages.slashStart); + + const nameToCheck = nameInputVal.substring(1); + const regex = /^[a-z-]+$/; + + if (!regex.test(nameToCheck)) { + callError(errorMessages.regex, 'error', true); + } else { + deleteError(errorMessages.regex); + } + if (nameInputVal.length > 32) { + callError(errorMessages.length, 'error', true); + } else { + deleteError(errorMessages.length); + } + } + } else if (selectValue === 'auto') { + const nameToCheck = nameInputVal.substring(1); + const regex = /^[a-zA-Z-]+$/; + + if (callbackKeywords.some(keyword => nameInputVal.startsWith(keyword))) { + commandType = ' • Callback'; + } else if (nameInputVal.startsWith('/')) { + commandType = ' • Slash Command'; + if (!regex.test(nameToCheck)) { + callError(errorMessages.regex, 'error', true); + } else { + deleteError(errorMessages.regex); + } + if (nameInputVal.length > 32) { + callError(errorMessages.length, 'error', true); + } else { + deleteError(errorMessages.length); + } + } else { + commandType = ' • Command'; + } + + } else { + commandType = ' • Command'; + } + if(nameLabel) + nameLabel.textContent = 'Name' + commandType; +} + +function bdscript2() { + const editor = document.getElementById("editor"); + const languageSelect = document.querySelector('select[name="language"]'); + const scriptLanguage = languageSelect.value; + const scriptText = editor.value; + + const bdscript2Keywords = ["$try", "$endtry", "$catch", "$async", "$endasync", "$eval", "$error", "$optOff", "$elseif", "$stop", "$var"]; + + const containsBDScript2Keywords = bdscript2Keywords.some(keyword => scriptText.includes(keyword)); + + if (containsBDScript2Keywords && scriptLanguage !== "bds2") { + const firstKeyword = bdscript2Keywords.find(keyword => scriptText.includes(keyword)); + callError(`Function ${firstKeyword} is only available in BDScript2`); + } +} + +function editorAreaButtons() { + const scriptDiv = document.querySelector('.scriptdiv'); + const buttons = scriptDiv.querySelectorAll('button'); + const isHidden = buttons[0].style.display === 'none'; + + buttons.forEach(button => { + button.style.display = isHidden ? 'inline-block' : 'none'; + }); + + callButtonChange('usefulButtonsButton', isHidden); +} + + +function editorBrokeLinks() { + const links = document.getElementsByTagName('a'); + + for (let i = 0; i < links.length; i++) { + links[i].setAttribute('href', '#'); + links[i].style.pointerEvents = 'none'; + } + + callButtonChange('brokeLinksButton', 'true'); +} + +let isWrappingEnabled = false; + +function editorWrapping() { + const textarea = document.getElementById('editor'); + const findcode = document.getElementById('highlightedText'); + isWrappingEnabled = !isWrappingEnabled; + + textarea.style.whiteSpace = isWrappingEnabled ? 'pre-wrap' : 'nowrap'; + findcode.style.whiteSpace = isWrappingEnabled ? 'pre-wrap' : 'nowrap'; + + callButtonChange('textWrappingButton', isWrappingEnabled); +} + +function callButtonChange(buttonName, status) { + const button = document.getElementById(buttonName); + + if (!button) { + console.error(`Failed to find "${buttonName}" button.`); + return; + } + + const activeGradient = 'linear-gradient(to right, rgb(255 255 255 / 40%), rgb(1 192 36 / 75%))'; + const inactiveGradient = 'linear-gradient(to left, rgb(255 255 255 / 40%), rgb(192 1 1 / 75%))'; + const extraGradient = 'linear-gradient(to right, rgb(255 255 255 / 40%), rgb(0 0 0 / 50%))'; + + if (buttonName === 'brokeLinksButton') { + button.style.background = extraGradient; + } else { + button.style.background = status ? activeGradient : inactiveGradient; + } +} diff --git a/src/theme/settings/apply-settings.js b/src/theme/settings/apply-settings.js index 5f0a10f69bc..06161e54cc6 100644 --- a/src/theme/settings/apply-settings.js +++ b/src/theme/settings/apply-settings.js @@ -149,13 +149,12 @@ function applySettings() { } catch {} const defaultData = { - folders: false, "discord-example-theme": "dark", "text-size": "60%", - language: "en", + "language": "en", "text-hg": "none", "text-font": "Open Sans, sans-serif", - effects: "hidden", + "effects": "hidden", "code-hg": { defaultTextHighlight: { color: 4288341353, @@ -222,12 +221,52 @@ function applySettings() { html.style.fontFamily = data["text-font"]; html.style.fontSize = data["text-size"]; html.style.textShadow = data["text-hg"]; - + if (snowflakes) { snowflakes.style.visibility = data["effects"]; } - setDiscordTheme(data["discord-example-theme"]); + document.querySelectorAll('.chapter > li.chapter-item').forEach(el => { + if (el.querySelector('div')) { + const text = el.querySelector('div').textContent.trim(); + if (text === 'Functions' || text === 'Premium') { + el.classList.add('functions-section'); + } + } + }); + + // Tools redirecting & ToS + +const currentPath = window.location.pathname; +const currentHref = window.location.href; + +if (currentPath.includes('/tools/')) { + const fileName = currentPath.split('/').pop(); + window.location.replace('https://bdfd-tool.github.io/bdfd-wiki/nightly/tools/' + fileName); +} +else if (currentPath.includes('/terms.html') || currentHref.includes('terms.html')) { + window.location.replace('https://botdesignerdiscord.com/tos'); +} +else { + const allLinks = document.querySelectorAll('a[href]'); + + allLinks.forEach(link => { + const href = link.getAttribute('href'); + + if (href) { + if (href.indexOf('../tools/') === 0) { + const newHref = 'https://bdfd-tool.github.io/bdfd-wiki/nightly/tools/' + href.substring(9); + link.setAttribute('href', newHref); + } + + if (href.includes('terms.html')) { + link.setAttribute('href', 'https://botdesignerdiscord.com/tos'); + } + } + }); +} + + setDiscordTheme(data["discord-example-theme"]); } applySettings(); diff --git a/src/theme/settings/index.js b/src/theme/settings/index.js index c7049699062..86a50eedaa9 100644 --- a/src/theme/settings/index.js +++ b/src/theme/settings/index.js @@ -151,24 +151,6 @@ function changeDiscordTheme(colorId) { updateJsonFile("discord-example-theme", colorId); } -function foldersSetting() { - const manageFolderButton = document.getElementById("manageFolder"); - let inv = JSON.parse(localStorage.getItem("json")); - - if (inv["folders"] === false) { - // Enabled - var folderStatus = "Disable"; - var boolFolderStatus = true; - } else { - // Disabled - var folderStatus = "Enable"; - var boolFolderStatus = false; - } - - manageFolderButton.textContent = folderStatus; - updateJsonFile("folders", boolFolderStatus); -} - function effectsSetting() { const manageEffectButton = document.getElementById("manageEffect"); const snowflakes = document.querySelector(".snowflakes"); @@ -328,9 +310,9 @@ function updateCodeHG() { const jsonHG = codeInput.value; const charCount = codeInput.value.replace(/[\s\n]/g, "").length; // Ignore spaces and new rows - charCountElement.textContent = `${charCount} / 10000`; + charCountElement.textContent = `${charCount} / 25000`; - if (charCount >= 10000) { + if (charCount > 25000) { charCountElement.style.color = "red"; } else { charCountElement.style.color = ""; @@ -364,7 +346,6 @@ function loadSettings() { const charCountElement = document.querySelector(".charCount"); const uiManageEffectButton = document.getElementById("manageEffect"); const uiSnowflakes = document.querySelector(".snowflakes"); - const uiManageFolderButton = document.getElementById("manageFolder"); let data; @@ -373,13 +354,12 @@ function loadSettings() { } catch {} data ??= { - folders: false, "discord-example-theme": "dark", "text-size": "60%", - language: "en", + "language": "en", "text-hg": "none", "text-font": "Open Sans, sans-serif", - effects: "hidden", + "effects": "hidden", "code-hg": { defaultTextHighlight: { color: 4288341353, @@ -449,7 +429,7 @@ function loadSettings() { var inputcodedesign = JSON.stringify(codedesign); const charJSONCount = inputcodedesign.length; - charCountElement.textContent = `${charJSONCount} / 10000`; + charCountElement.textContent = `${charJSONCount} / 25000`; codeTextInput.value = inputcodedesign; } @@ -467,14 +447,6 @@ function loadSettings() { uiSnowflakes.style.visibility = data["effects"]; uiManageEffectButton.textContent = effectStatus; - if (data["folders"] === false) { - var folderStatus = "Enable"; - } else { - var folderStatus = "Disable"; - } - - uiManageFolderButton.textContent = folderStatus; - const button = document.querySelector(".resetToDefault"); button.addEventListener("mousedown", resetAllHover); button.addEventListener("mouseup", resettAllNone); diff --git a/src/theme/settings/style.css b/src/theme/settings/style.css index 2f230a838e7..6f79d0b787a 100644 --- a/src/theme/settings/style.css +++ b/src/theme/settings/style.css @@ -62,19 +62,19 @@ body { border-radius: var(--border-radius); border: 1px solid rgba(255, 255, 255, 0.05); margin-top: 1.5rem; - padding-bottom: 1.5rem; - padding-left: 15px; - padding-right: 15px; + padding-bottom: 1rem; + padding-left: 1.5rem; + padding-right: 1.5rem; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3); } .settingembed h2 { - margin-top: 60px; - padding-top: 15px; + margin-top: 0rem; + padding-top: 1rem; } .settingembed p { - margin-top: -15px; + margin-top: -1.5rem; } /* Buttons */ @@ -98,7 +98,6 @@ button:not(#menu-bar i, #menu-bar .icon-button) { } .textfontbuttons, -.folderbuttons, .effectbuttons { user-select: none; -webkit-user-select: none; @@ -110,8 +109,7 @@ button:not(#menu-bar i, #menu-bar .icon-button) { .fbutton, .hgButton, .hbutton, -.ebutton, -.folderbutton { +.ebutton { -webkit-user-select: none; user-select: none; touch-action: manipulation; @@ -162,7 +160,7 @@ button:not(#menu-bar i, #menu-bar .icon-button) { max-height: 35em; border-radius: 10px; border-width: 0; - color: #bbb; + color: #fff; background: hsl(0deg 0% 100% / 7%); padding: 7px; font-size: 1.5rem; @@ -287,8 +285,7 @@ button:not(#menu-bar i, #menu-bar .icon-button) { .fbutton:hover, .hgButton:hover, .hbutton:hover, -.ebutton:hover, -.folderbutton:hover { +.ebutton:hover { background: hsl(0deg 0% 100% / 12%); } diff --git a/src/tools/color.md b/src/tools/color.md new file mode 100644 index 00000000000..45e55798de8 --- /dev/null +++ b/src/tools/color.md @@ -0,0 +1,7 @@ + + +Redirectig to https://bdfd-tool.github.io/bdfd-wiki/nightly/tools/color.html diff --git a/src/tools/editor.md b/src/tools/editor.md new file mode 100644 index 00000000000..c6b357012c1 --- /dev/null +++ b/src/tools/editor.md @@ -0,0 +1,7 @@ + + +Redirecting to https://bdfd-tool.github.io/bdfd-wiki/nightly/tools/editor.html diff --git a/src/tools/permissionscalculator.md b/src/tools/permissionscalculator.md new file mode 100644 index 00000000000..46dbcd3ac70 --- /dev/null +++ b/src/tools/permissionscalculator.md @@ -0,0 +1,7 @@ + + +Redirecting to https://bdfd-tool.github.io/bdfd-wiki/nightly/tools/permissionscalculator.html diff --git a/src/tools/timestamp.md b/src/tools/timestamp.md new file mode 100644 index 00000000000..61bc2395f6a --- /dev/null +++ b/src/tools/timestamp.md @@ -0,0 +1,7 @@ + + +Redirecting to https://bdfd-tool.github.io/bdfd-wiki/nightly/tools/timestamp.html