Find function
Search for a BDFD function by name or by its index. Source Code from December 31, 2023
Versions
You must choose BDScript 2 for the command to work correctly.
BDFD Function Search (Version 2.0)
Trigger
Script Language
Characters
Functions
$c[Thanks for rainbow_key & kitomanari]
$nomention
$var[color;748ad2] $c[<-------- Success embed color]
$var[errorColor;ff335c] $c[<-------- Fail embed color]
$var[error;false] $c[<-------- Don't change it]
$var[msg;$replaceText[$replaceText[$replaceText[$replaceText[$replaceText[$toLowercase[$message];%{DOL}%;];`;];-;];,;;-1];.;]] $c[<-------- Function Search request]
$c[↓-------- Emojis for parameters]
$var[?mark;❓]
$var[!mark;‼️]
$httpGet[https://botdesignerdiscord.com/public/api/function_tag_list]
$if[$isNumber[$var[msg]]==true] $c[<-------- Search by function index]
$textSplit[$httpResult;,]
$var[func;$replaceText[$replaceText[$replaceText[$splitText[$var[msg]];[";];"%ESCAPED%;];";]]
$var[mdTag;$replaceText[$replaceText[$var[func];[\];];$;]]
$else $c[<-------- Search by function name]
$if[$checkContains[$var[msg];[;%ESCAPED%]==true] $var[breadcrumbs;[%ESCAPED%] $endif
$var[msg;$replaceText[$replaceText[%{DOL}%$var[msg];[;];\];]]
$textSplit[$toLowercase[$httpResult];"$var[msg]]
$textSplit[$splitText[2];"]
$var[func;$replaceText[$var[msg]$splitText[1]$var[breadcrumbs];[%ESCAPED%[%ESCAPED%;[%ESCAPED%]]
$var[funcType;function]
$if[$checkContains[$toLowercase[$httpResult];$var[func]]==false] $c[<-------- Search by callback name]
$if[$checkContains[$var[msg];[;%ESCAPED%]==true]
$var[breadcrumbs;[%ESCAPED%]
$endif
$httpGet[https://botdesignerdiscord.com/public/api/callback_tag_list]
$var[msg;%{DOL}%$replaceText[$var[msg];%{DOL}%;;-1]]
$textSplit[$toLowercase[$httpResult];"$var[msg]]
$textSplit[$splitText[2];"]
$var[func;$replaceText[$var[msg]$splitText[1]$var[breadcrumbs];[%ESCAPED%[%ESCAPED%;[%ESCAPED%]]
$var[funcType;callback]
$endif
$if[$var[funcType]==callback]
$httpGet[https://botdesignerdiscord.com/public/api/callback_tag_list]
$else
$httpGet[https://botdesignerdiscord.com/public/api/function_tag_list]
$endif
$textSplit[$replaceText[$replaceText[$toLowercase[$optOff[$httpResult]];[";];"%ESCAPED%;];","]
$var[func-number;$optOff[$getTextSplitIndex[$var[func]]]]
$textSplit[$httpResult;","]
$try
$var[func;$replaceText[$replaceText[$splitText[$var[func-number]];[";];"%ESCAPED%;]]
$var[mdTag;$replaceText[$replaceText[$var[func];[\];];$;]]
$catch
$var[func;none]
$var[mdTag;none]
$endtry
$endif
$httpGet[https://botdesignerdiscord.com/public/api/function_tag_list]
$jsonParse[{"f": $httpResult}]
$var[index;$jsonArrayIndex[f;$var[func]]]
$textSplit[$httpResult;,]
$var[ftl;$joinSplitText[
]]
$var[ftl;$replaceText[$var[ftl];"$c["];]]
$textSplit[$var[ftl];
]
$var[Count;$getTextSplitLength] $c[<-------- Command count calculator]
$var[FunctionPosition;$sum[$var[index];1]] $c[<-------- Command position (Index)]
$if[$or[$var[msg]==;$var[index]==-1]==true]
$var[error;true]
$endif
$if[$var[error]==true] $c[<-------- Function not found]
$color[#$var[errorColor]]
$author[Function not found]
$authorIcon[$userAvatar[$botID]]
$description[**Error:** Function not found. Correct the errors in the function name!]
$else
$if[$var[funcType]==callback]
$httpGet[https://botdesignerdiscord.com/public/api/callback/$var[func]]
$var[f_type;$replaceText[$replaceText[$httpResult[is_premium];true;premium];false;callbacks]]
$else
$httpGet[https://botdesignerdiscord.com/public/api/function/$var[func]]
$var[f_type;$replaceText[$replaceText[$httpResult[premium];true;premium];false;bdscript]]
$endif
$jsonParse[$httpResult]
$color[$var[color]]
$title[Command Information]
$embeddedURL[https://nilpointer-software.github.io/bdfd-wiki/nightly/$var[f_type]/$var[mdTag].html]
$footer[BDFD have $var[Count] commands!]
$if[$var[funcType]==callback] $description[```$httpResult[name]```] $else $description[```$httpResult[tag]```] $endif
$if[$httpResult[shortDescription]!=] $addField[Description;```$httpResult[shortDescription]```] $elseif[$httpResult[description]!=] $addField[Description;```$httpResult[description]```] $endif
$addField[Available for:;$if[$var[f_type]==premium]Premium users $else Everyone$endif;yes]
$if[$httpResult[arguments;0;name]!=]
$var[total;$jsonArrayCount[arguments]]
$addField[Parameters - $var[total]:;** **]
$c[↓-------- Parameters]
$if[$httpResult[arguments;0;name]!=]$addField[$httpResult[arguments;0;name];
Type: `$httpResult[arguments;0;type]` | Status: $if[$httpResult[arguments;0;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;0;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;1;name]!=]$addField[$httpResult[arguments;1;name];
Type: `$httpResult[arguments;1;type]` | Status: $if[$httpResult[arguments;1;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;1;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;2;name]!=]$addField[$httpResult[arguments;2;name];
Type: `$httpResult[arguments;2;type]` | Status: $if[$httpResult[arguments;2;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;2;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;3;name]!=]$addField[$httpResult[arguments;3;name];
Type: `$httpResult[arguments;3;type]` | Status: $if[$httpResult[arguments;3;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;3;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;4;name]!=]$addField[$httpResult[arguments;4;name];
Type: `$httpResult[arguments;4;type]` | Status: $if[$httpResult[arguments;4;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;4;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;5;name]!=]$addField[$httpResult[arguments;5;name];
Type: `$httpResult[arguments;5;type]` | Status: $if[$httpResult[arguments;5;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;5;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;6;name]!=]$addField[$httpResult[arguments;6;name];
Type: `$httpResult[arguments;6;type]` | Status: $if[$httpResult[arguments;6;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;6;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;7;name]!=]$addField[$httpResult[arguments;7;name];
Type: `$httpResult[arguments;7;type]` | Status: $if[$httpResult[arguments;7;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;7;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;8;name]!=]$addField[$httpResult[arguments;8;name];
Type: `$httpResult[arguments;8;type]` | Status: $if[$httpResult[arguments;8;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;8;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;9;name]!=]$addField[$httpResult[arguments;9;name];
Type: `$httpResult[arguments;9;type]` | Status: $if[$httpResult[arguments;9;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;9;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;10;name]!=]$addField[$httpResult[arguments;10;name];
Type: `$httpResult[arguments;10;type]` | Status: $if[$httpResult[arguments;10;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;10;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;11;name]!=]$addField[$httpResult[arguments;11;name];
Type: `$httpResult[arguments;11;type]` | Status: $if[$httpResult[arguments;11;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;11;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;12;name]!=]$addField[$httpResult[arguments;12;name];
Type: `$httpResult[arguments;12;type]` | Status: $if[$httpResult[arguments;12;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;12;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;13;name]!=]$addField[$httpResult[arguments;13;name];
Type: `$httpResult[arguments;13;type]` | Status: $if[$httpResult[arguments;13;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;13;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$if[$httpResult[arguments;14;name]!=]$addField[$httpResult[arguments;14;name];
Type: `$httpResult[arguments;14;type]` | Status: $if[$httpResult[arguments;14;required]==true]$var[!mark]Required$elseif[$httpResult[arguments;14;empty]==true]$var[?mark]Vacantable$elseNot defined$endif]$endif
$endif
BDFD Function Search
Trigger
Script Language
Characters
Functions
Last updated