buildembed
Epic Build Embed tag made by Asty'#8926
Sharedunrated
Content
348 lines{=(COMMENT):User Settings}
{=(prefix):!}
{=(tagName):buildembed|be}
{=(offsetFromUTC):0}
{=(example):{prefix}{tagName} title:My title|desc:My description|thumb:https://i.imgur.com/0l0ZBCm.png|footer:My footer|color:blurple}
{=(defaultColor):2f3136}
{=(defaultFooter):{prefix}{tagName} title:My title|desc:My description|color:red}
{=(defaultFooter):{example}}
{=(COMMENT):Only the roles specified in there (separated by a comma) will be able to use that command. Leave empty if you don't mind.}
{=(requiredRoles):}
{=(COMMENT):The error message to output to the user when they don't have the required role. Leaving it empty will react to the user's message with the ⚠️ emoji, and leaving a space " " character won't return an error message at all}
{=(requiredRolesErrorMessage):}
{=(COMMENT):Adding or subtracting (depending on if the offset is positive or negative) the offset from UTC specified above to the current unix time.}
{=(unixTimezone):{m:trunc({unix}+({offsetFromUTC}*3600))}}
{=(defaultTime):{strf({unixTimezone}):%FT%T.000Z}}
{=(delimiter):|}
{=(r):replace}
{=(i):index}
{=(l):lower}
{=(j):join}
{=(ct):contains}
{=(fb):None}
{=(del):{delimiter}}
{=(pl):%&$}
{=(uav):{user(avatar)}}
{=(sic):{server(icon)}}
{=(COMMENT):Curly brace snippet}
{=( ):{ }}
{=(b):{ (1)}}
{=(d):{ (2)}}
{=(emojiPrefix):<emoji}
{=(isAChannelSpecified):{in(true true):{in(<#):{1}} {in(>):{1}}}}
{=(channelToSend):{{r}(false,{channel(id)}):{{r}(true,{1}):{isAChannelSpecified}}}}
{=(COMMENT):Separating arguments into their own list variables. Replaces the delimiter with ~ in the process.}
{=(sanitizedArgs):{{r}({emojiPrefix},<:emoji:):{{r}(",\"):{args}}}}
{=(argumentToParse):{{if({isAChannelSpecified}==true):sanitizedArgs(2+)|sanitizedArgs}}}
{=(jargs):{{r}({del},~):!~{argumentToParse}}}
{=(a1):{list(1):{jargs}}}
{=(a2):{list(2):{jargs}}}
{=(a3):{list(3):{jargs}}}
{=(a4):{list(4):{jargs}}}
{=(a5):{list(5):{jargs}}}
{=(a6):{list(6):{jargs}}}
{=(a7):{list(7):{jargs}}}
{=(a8):{list(8):{jargs}}}
{=(a9):{list(9):{jargs}}}
{=(a10):{list(10):{jargs}}}
{=(a11):{list(11):{jargs}}}
{=(a12):{list(12):{jargs}}}
{=(fieldsName):image title titleurl name color nameicon nameurl description thumbnail footer footericon timestamp {fb} !}
{=(COMMENT):Processes a substring matching on the keyword/field name of every argument up to the 12th and returns it.}
{=(COMMENT):Raw argument word, substring matched word, and then word content}
{=(w1):{{l}:{a1(1)::}}}
{=(word1):{fieldsName({{i}({w1}):{{r}({w1},. {w1} .):{fieldsName}}})}}
{=(content1):{a1(2+)::}}
{=(w2):{{l}:{a2(1)::}}}
{=(word2):{fieldsName({{i}({w2}):{{r}({w2},. {w2} .):{fieldsName}}})}}
{=(content2):{a2(2+)::}}
{=(w3):{{l}:{a3(1)::}}}
{=(word3):{fieldsName({{i}({w3}):{{r}({w3},. {w3} .):{fieldsName}}})}}
{=(content3):{a3(2+)::}}
{=(w4):{{l}:{a4(1)::}}}
{=(word4):{fieldsName({{i}({w4}):{{r}({w4},. {w4} .):{fieldsName}}})}}
{=(content4):{a4(2+)::}}
{=(w5):{{l}:{a5(1)::}}}
{=(word5):{fieldsName({{i}({w5}):{{r}({w5},. {w5} .):{fieldsName}}})}}
{=(content5):{a5(2+)::}}
{=(w6):{{l}:{a6(1)::}}}
{=(word6):{fieldsName({{i}({w6}):{{r}({w6},. {w6} .):{fieldsName}}})}}
{=(content6):{a6(2+)::}}
{=(w7):{{l}:{a7(1)::}}}
{=(word7):{fieldsName({{i}({w7}):{{r}({w7},. {w7} .):{fieldsName}}})}}
{=(content7):{a7(2+)::}}
{=(w8):{{l}:{a8(1)::}}}
{=(word8):{fieldsName({{i}({w8}):{{r}({w8},. {w8} .):{fieldsName}}})}}
{=(content8):{a8(2+)::}}
{=(w9):{{l}:{a9(1)::}}}
{=(word9):{fieldsName({{i}({w9}):{{r}({w9},. {w9} .):{fieldsName}}})}}
{=(content9):{a9(2+)::}}
{=(w10):{{l}:{a10(1)::}}}
{=(word10):{fieldsName({{i}({w10}):{{r}({w10},. {w10} .):{fieldsName}}})}}
{=(content10):{a10(2+)::}}
{=(w11):{{l}:{a11(1)::}}}
{=(word11):{fieldsName({{i}({w11}):{{r}({w11},. {w11} .):{fieldsName}}})}}
{=(content11):{a11(2+)::}}
{=(w12):{{l}:{a12(1)::}}}
{=(word12):{fieldsName({{i}({w12}):{{r}({w12},. {w12} .):{fieldsName}}})}}
{=(content12):{a12(2+)::}}
{=(COMMENT):Fields variables from input. This is where we call our default values as their content if any.}
{=(COMMENT):Order of the variables assignments in the same order as the embed builder.}
{=(f.name):}
{=(f.nameicon):}
{=(f.nameurl):}
{=(f.title):}
{=(f.titleurl):}
{=(f.description):}
{=(f.image):}
{=(f.thumbnail):}
{=(f.footer):}
{=(f.footericon):}
{=(f.timestamp):}
{=(f.color):{defaultColor}}
{=(f.{word1}):{content1}}
{=(f.{word2}):{content2}}
{=(f.{word3}):{content3}}
{=(f.{word4}):{content4}}
{=(f.{word5}):{content5}}
{=(f.{word6}):{content6}}
{=(f.{word7}):{content7}}
{=(f.{word8}):{content8}}
{=(f.{word9}):{content9}}
{=(f.{word10}):{content10}}
{=(f.{word11}):{content11}}
{=(f.{word12}):{content12}}
{=(COMMENT):Allowing the word "now" to be used for the "timestamp" field.}
{=(f.timestamp):{if({{l}:{f.timestamp}}==now):{{r}(now,{defaultTime}):{{l}:{f.timestamp}}}}}
{=(COMMENT):Although I'm allowing "self" and other keywords for user color, this is allowing the custom user color TagScript block to work beforehand.}
{=(f.color):{{r}({b}user(color){d},{user(color)}):{{j}():{f.color}}}}
{=(COMMENT):Allowing custom blocks like user avatar and server icon to be used in image fields as arguments.}
{=(f.image):{{r}({b}icon{d},{sic}):{{r}({b}server(icon){d},{b}icon{d}):{{r}({b}avatar{d},{uav}):{{r}({b}user(avatar){d},{b}avatar{d}):{f.image}}}}}}
{=(f.nameicon):{{r}({b}icon{d},{sic}):{{r}({b}server(icon){d},{b}icon{d}):{{r}({b}avatar{d},{uav}):{{r}({b}user(avatar){d},{b}avatar{d}):{f.nameicon}}}}}}
{=(f.nicon):{{r}({b}icon{d},{sic}):{{r}({b}server(icon){d},{b}icon{d}):{{r}({b}avatar{d},{uav}):{{r}({b}user(avatar){d},{b}avatar{d}):{f.nico}}}}}}
{=(f.thumbnail):{{r}({b}icon{d},{sic}):{{r}({b}server(icon){d},{b}icon{d}):{{r}({b}avatar{d},{uav}):{{r}({b}user(avatar){d},{b}avatar{d}):{f.thumbnail}}}}}}
{=(f.footericon):{{r}({b}icon{d},{sic}):{{r}({b}server(icon){d},{b}icon{d}):{{r}({b}avatar{d},{uav}):{{r}({b}user(avatar){d},{b}avatar{d}):{f.footericon}}}}}}
{=(COMMENT):Allowing custom blocks in text fields.}
{=(f.title):{{r}({b}channel{d},{channel}):{{r}({b}server{d},{server}):{{r}({b}user{d},{user}):{f.title}}}}}
{=(f.name):{{r}({b}channel{d},{channel}):{{r}({b}server{d},{server}):{{r}({b}user{d},{user}):{f.name}}}}}
{=(f.footer):{{r}({b}channel{d},{channel}):{{r}({b}server{d},{server}):{{r}({b}user{d},{user}):{f.footer}}}}}
{=(f.description):{{r}({b}channel(mention){d},{channel(mention)}):{{r}({b}channel{d},{channel}):{{r}({b}server{d},{server}):{{r}({b}mention{d},{user(mention)}):{{r}({b}user(mention){d},{b}mention{d}):{{r}({b}user{d},{user}):{f.description}}}}}}}}
{=(COMMENT):Spaces out the color, then removes the first and last added space}
{=(sepColor):{{r}(, ):{f.color}}}
{=(sepColor):{sepColor(2+)}}
{=(sepColor):{sepColor(+-1)}}
{=(COMMENT):Sanitize our color to only keep our first 6 characters of it, remove the # sign if any and make every letter uppercase}
{=(sanitizedColor):{{r}(#,):{lower:{{j}():{sepColor}}}}}
{=(COMMENT):Dictionary of color names, returned as hex. https://htmlcolorcodes.com/color-names/}
{=(cl.{f.color}):{sanitizedColor(+6)}}
{=(cl.white):FFFFFF}
{=(cl.silver):C0C0C0}
{=(cl.gray):808080}
{=(cl.grey):{cl.gray}}
{=(cl.slategray):708090}
{=(cl.slategrey):{cl.slategray}}
{=(cl.black):000000}
{=(cl.red):FF0000}
{=(cl.yellow):FFFF00}
{=(cl.lime):00FF00}
{=(cl.green):008000}
{=(cl.cyan):00FFFF}
{=(cl.blue):0000FF}
{=(cl.navy):000080}
{=(cl.purple):800080}
{=(cl.salmon):FA8072}
{=(cl.pink):FFC0CB}
{=(cl.coral):FF7F50}
{=(cl.orange):FFA500}
{=(cl.gold):FFD700}
{=(cl.magenta):FF00FF}
{=(cl.violet):EE82EE}
{=(cl.indigo):4B0082}
{=(cl.slateblue):6A5ACD}
{=(cl.midnightblue):191970}
{=(cl.wheat):F5DEB3}
{=(cl.chocolate):F5DEB3}
{=(cl.discord):2F3136}
{=(cl.embed):{cl.discord}}
{=(cl.blurple):7289DA}
{=(cl.self):{user(color)}}
{=(cl.myself):{cl.self}}
{=(cl.me):{cl.self}}
{=(finalHexColor):{upper:{cl.{lower:{{j}():{f.color}}}}}}
{=(COMMENT):Spacing out our hexadecimal code}
{=(spacedHex):{{r}(F,15):{{r}(E,14):{{r}(D,13):{{r}(C,12):{{r}(B,11):{{r}(A,10):{{r}(, ):{finalHexColor}}}}}}}}}
{=(spacedHex):{spacedHex(2+)}}
{=(spacedHex):{{j}(~):{spacedHex(+-1)}}}
{=(COMMENT):Hex to decimal part}
{=(finalDecimalColor):{m:trunc({{j}():{spacedHex(0):~}*16^0 + {spacedHex(-1):~}*16^1 + {spacedHex(-2):~}*16^2 + {spacedHex(-3):~}*16^3 + {spacedHex(-4):~}*16^4 + {spacedHex(-5):~}*16^5)}}}
{=(finalJSON):{ "url":"{f.titleurl}",
"title": "{f.title}",
"description": "{f.description}",
"thumbnail": {
"url": "{f.thumbnail}"
},
"image": {
"url": "{f.image}"
},
"author": {
"name":"{f.name}",
"url": "{f.nameurl}",
"icon_url": "{f.nameicon}"
},
"color": {finalDecimalColor},
"footer": {
"icon_url": "{f.footericon}",
"text": "{f.footer}"
},
"timestamp": "{f.timestamp}"
}}
{=(allFields):{{j}():{{r}({fb},):{word1} {word2} {word3} {word4} {word5} {word6} {word7} {word8} {word9} {word10} {word11} {word12}}}}
{=(areAllFieldsEmpty):{{ct}({pl}):{allFields}{pl}}}
{=(isNoArg):{{ct}({pl}):{a1}{pl}}}
{=(errJSON):{ "description": "No field detected.\nExample:
`{example}`",
"color": {finalDecimalColor}
}
}
{=(errJSON):{ "fields": [
{ "name":
"Features","value":"• **Substring Matching** on each field name (`t` works for `title`, `desc` for `description`, etc.)\n• Fields names can all be filled and in **any order** of your choice!\n• Built-in **error messages**, to let you know what's wrong and when.\n• Ability to specify a color name, hexadecimal color, or even `self` for your own color.\n• **Custom-made blocks** to use in some fields, like user `{avatar}` and server `{icon}` in image fields, `{server}` and `{channel}` in text fields, and `{channel(mention)}` in the Description field.\n• Even for non-Nitro users, ability to use **custom emojis** **from other servers**, by using `<emoji` followed by the **emoji ID** and `>`. For example, `<emoji803680930841362442>` would display <:TagScript:803680930841362442>.\n","inline":false
},
{ "name":
"Usage",
"value":
"`!be fieldName:Content|fieldName:Content`\n```yaml\n!be t:My title|d:My description|thumb:https://i.imgur.com/0l0ZBCm.png|image:https://i.imgur.com/0l0ZBCm.png|f:My footer|color:blurple|time:now\n```",
"inline":
false
}],
"title":
"Build A Custom Embed",
"description":
"Forget about the built-in `!embed` and `!cembed` commands, that are not customizable nor very user friendly, as they require specific syntax, and the latter a minimum knowledge of what JSON even is, which is not the average person.",
"image":{
"url":
"https://i.imgur.com/SlCjHKv.png"
},
"color":3092790,
"footer": {
"text":"Custom command made with ♥ for TagScript by Asty'#8926"
}
}
}
{=(JSONs):errJSON finalJSON}
{=(shouldErr):{in(true):{areAllFieldsEmpty} {isNoArg}}}
{=(JSONIdx):{{i}(true):! {shouldErr} true}}
{=(JSONToSend):{{JSONs({JSONIdx})}}}
{=(debug):__Debug:__
jargs: {jargs}
1: {w1} `{word1}` {content1}
2: {w2} `{word2}` {content2}
3: {w3} `{word3}` {content3}
4: {w4} `{word4}` {content4}
5: {w5} `{word5}` {content5}
6: {w6} `{word6}` {content6}
7: {w7} `{word7}` {content7}
8: {w8} `{word8}` {content8}
9: {w9} `{word9}` {content9}
10: {w10} `{word10}` {content10}
11: {w11} `{word11}` {content11}
12: {w12} `{word12}` {content12}
f.image: {f.image}
f.title: {f.name}
f.titleurl: {f.name}
f.name: {f.name}
f.nameicon: {f.nameicon}
f.nameurl: {f.nameurl}
**Color**
f.color: {f.color} - sepColor: {sepColor} - sanitizedColor: {sanitizedColor}
spacedHex: `{spacedHex}`
finalHexColor: `{finalHexColor}`
finalDecimalColor: `{finalDecimalColor}`
f.description: {f.description}
f.thumbnail: {f.thumbnail}
f.footer: {f.footer}
f.footericon: {f.footericon}
f.timestamp: {f.timestamp}
}
{=(testing):Example:```css
{example}```
FINAL JSON:```json
{finalJSON}
```}
{=(debug2):__Debug 2:__
areAllFieldsEmpty: {areAllFieldsEmpty}
isNoArg: {isNoArg}
JSONToSend:```json
{JSONToSend}
```
}
{c:cembed {channelToSend} {JSONToSend}}
{override}
{require({requiredRolesErrorMessage} ):{requiredRoles}}Raw JSON
{
"id": 1157946,
"created_at": "2021-11-19T14:50:04.000Z",
"tag_name": "buildembed",
"nsfw": false,
"owner_id": "149926720114262016",
"uses": 181,
"description": "Epic Build Embed tag made by Asty'#8926",
"restricted": false,
"shared": true,
"deleted": false,
"safe": "unrated",
"hidden": false,
"guild_id": "314660900302749696",
"sharer": "149926720114262016",
"content": "{=(COMMENT):User Settings}\n{=(prefix):!}\n{=(tagName):buildembed|be}\n\n{=(offsetFromUTC):0}\n\n{=(example):{prefix}{tagName} title:My title|desc:My description|thumb:https://i.imgur.com/0l0ZBCm.png|footer:My footer|color:blurple}\n\n{=(defaultColor):2f3136}\n{=(defaultFooter):{prefix}{tagName} title:My title|desc:My description|color:red}\n{=(defaultFooter):{example}}\n\n{=(COMMENT):Only the roles specified in there (separated by a comma) will be able to use that command. Leave empty if you don't mind.}\n{=(requiredRoles):}\n{=(COMMENT):The error message to output to the user when they don't have the required role. Leaving it empty will react to the user's message with the ⚠️ emoji, and leaving a space \" \" character won't return an error message at all}\n{=(requiredRolesErrorMessage):}\n\n\n{=(COMMENT):Adding or subtracting (depending on if the offset is positive or negative) the offset from UTC specified above to the current unix time.}\n{=(unixTimezone):{m:trunc({unix}+({offsetFromUTC}*3600))}}\n\n{=(defaultTime):{strf({unixTimezone}):%FT%T.000Z}}\n\n{=(delimiter):|}\n\n{=(r):replace}\n{=(i):index}\n{=(l):lower}\n{=(j):join}\n{=(ct):contains}\n{=(fb):None}\n{=(del):{delimiter}}\n{=(pl):%&$}\n{=(uav):{user(avatar)}}\n{=(sic):{server(icon)}}\n\n{=(COMMENT):Curly brace snippet}\n{=( ):{ }}\n{=(b):{ (1)}}\n{=(d):{ (2)}}\n\n{=(emojiPrefix):<emoji}\n\n{=(isAChannelSpecified):{in(true true):{in(<#):{1}} {in(>):{1}}}}\n{=(channelToSend):{{r}(false,{channel(id)}):{{r}(true,{1}):{isAChannelSpecified}}}}\n\n\n{=(COMMENT):Separating arguments into their own list variables. Replaces the delimiter with ~ in the process.}\n{=(sanitizedArgs):{{r}({emojiPrefix},<:emoji:):{{r}(\",\\\"):{args}}}}\n{=(argumentToParse):{{if({isAChannelSpecified}==true):sanitizedArgs(2+)|sanitizedArgs}}}\n{=(jargs):{{r}({del},~):!~{argumentToParse}}}\n{=(a1):{list(1):{jargs}}}\n{=(a2):{list(2):{jargs}}}\n{=(a3):{list(3):{jargs}}}\n{=(a4):{list(4):{jargs}}}\n{=(a5):{list(5):{jargs}}}\n{=(a6):{list(6):{jargs}}}\n{=(a7):{list(7):{jargs}}}\n{=(a8):{list(8):{jargs}}}\n{=(a9):{list(9):{jargs}}}\n{=(a10):{list(10):{jargs}}}\n{=(a11):{list(11):{jargs}}}\n{=(a12):{list(12):{jargs}}}\n\n{=(fieldsName):image title titleurl name color nameicon nameurl description thumbnail footer footericon timestamp {fb} !}\n\n{=(COMMENT):Processes a substring matching on the keyword/field name of every argument up to the 12th and returns it.}\n{=(COMMENT):Raw argument word, substring matched word, and then word content}\n{=(w1):{{l}:{a1(1)::}}}\n{=(word1):{fieldsName({{i}({w1}):{{r}({w1},. {w1} .):{fieldsName}}})}}\n{=(content1):{a1(2+)::}}\n\n{=(w2):{{l}:{a2(1)::}}}\n{=(word2):{fieldsName({{i}({w2}):{{r}({w2},. {w2} .):{fieldsName}}})}}\n{=(content2):{a2(2+)::}}\n\n{=(w3):{{l}:{a3(1)::}}}\n{=(word3):{fieldsName({{i}({w3}):{{r}({w3},. {w3} .):{fieldsName}}})}}\n{=(content3):{a3(2+)::}}\n\n{=(w4):{{l}:{a4(1)::}}}\n{=(word4):{fieldsName({{i}({w4}):{{r}({w4},. {w4} .):{fieldsName}}})}}\n{=(content4):{a4(2+)::}}\n\n{=(w5):{{l}:{a5(1)::}}}\n{=(word5):{fieldsName({{i}({w5}):{{r}({w5},. {w5} .):{fieldsName}}})}}\n{=(content5):{a5(2+)::}}\n\n{=(w6):{{l}:{a6(1)::}}}\n{=(word6):{fieldsName({{i}({w6}):{{r}({w6},. {w6} .):{fieldsName}}})}}\n{=(content6):{a6(2+)::}}\n\n{=(w7):{{l}:{a7(1)::}}}\n{=(word7):{fieldsName({{i}({w7}):{{r}({w7},. {w7} .):{fieldsName}}})}}\n{=(content7):{a7(2+)::}}\n\n{=(w8):{{l}:{a8(1)::}}}\n{=(word8):{fieldsName({{i}({w8}):{{r}({w8},. {w8} .):{fieldsName}}})}}\n{=(content8):{a8(2+)::}}\n\n{=(w9):{{l}:{a9(1)::}}}\n{=(word9):{fieldsName({{i}({w9}):{{r}({w9},. {w9} .):{fieldsName}}})}}\n{=(content9):{a9(2+)::}}\n\n{=(w10):{{l}:{a10(1)::}}}\n{=(word10):{fieldsName({{i}({w10}):{{r}({w10},. {w10} .):{fieldsName}}})}}\n{=(content10):{a10(2+)::}}\n\n{=(w11):{{l}:{a11(1)::}}}\n{=(word11):{fieldsName({{i}({w11}):{{r}({w11},. {w11} .):{fieldsName}}})}}\n{=(content11):{a11(2+)::}}\n\n{=(w12):{{l}:{a12(1)::}}}\n{=(word12):{fieldsName({{i}({w12}):{{r}({w12},. {w12} .):{fieldsName}}})}}\n{=(content12):{a12(2+)::}}\n\n{=(COMMENT):Fields variables from input. This is where we call our default values as their content if any.}\n{=(COMMENT):Order of the variables assignments in the same order as the embed builder.}\n\n{=(f.name):}\n{=(f.nameicon):}\n{=(f.nameurl):}\n\n{=(f.title):}\n{=(f.titleurl):}\n\n{=(f.description):}\n\n{=(f.image):}\n{=(f.thumbnail):}\n\n{=(f.footer):}\n{=(f.footericon):}\n\n{=(f.timestamp):}\n\n{=(f.color):{defaultColor}}\n\n{=(f.{word1}):{content1}}\n{=(f.{word2}):{content2}}\n{=(f.{word3}):{content3}}\n{=(f.{word4}):{content4}}\n{=(f.{word5}):{content5}}\n{=(f.{word6}):{content6}}\n{=(f.{word7}):{content7}}\n{=(f.{word8}):{content8}}\n{=(f.{word9}):{content9}}\n{=(f.{word10}):{content10}}\n{=(f.{word11}):{content11}}\n{=(f.{word12}):{content12}}\n\n{=(COMMENT):Allowing the word \"now\" to be used for the \"timestamp\" field.}\n{=(f.timestamp):{if({{l}:{f.timestamp}}==now):{{r}(now,{defaultTime}):{{l}:{f.timestamp}}}}}\n\n{=(COMMENT):Although I'm allowing \"self\" and other keywords for user color, this is allowing the custom user color TagScript block to work beforehand.}\n{=(f.color):{{r}({b}user(color){d},{user(color)}):{{j}():{f.color}}}}\n\n{=(COMMENT):Allowing custom blocks like user avatar and server icon to be used in image fields as arguments.}\n{=(f.image):{{r}({b}icon{d},{sic}):{{r}({b}server(icon){d},{b}icon{d}):{{r}({b}avatar{d},{uav}):{{r}({b}user(avatar){d},{b}avatar{d}):{f.image}}}}}}\n\n{=(f.nameicon):{{r}({b}icon{d},{sic}):{{r}({b}server(icon){d},{b}icon{d}):{{r}({b}avatar{d},{uav}):{{r}({b}user(avatar){d},{b}avatar{d}):{f.nameicon}}}}}}\n{=(f.nicon):{{r}({b}icon{d},{sic}):{{r}({b}server(icon){d},{b}icon{d}):{{r}({b}avatar{d},{uav}):{{r}({b}user(avatar){d},{b}avatar{d}):{f.nico}}}}}}\n\n{=(f.thumbnail):{{r}({b}icon{d},{sic}):{{r}({b}server(icon){d},{b}icon{d}):{{r}({b}avatar{d},{uav}):{{r}({b}user(avatar){d},{b}avatar{d}):{f.thumbnail}}}}}}\n\n{=(f.footericon):{{r}({b}icon{d},{sic}):{{r}({b}server(icon){d},{b}icon{d}):{{r}({b}avatar{d},{uav}):{{r}({b}user(avatar){d},{b}avatar{d}):{f.footericon}}}}}}\n\n{=(COMMENT):Allowing custom blocks in text fields.}\n{=(f.title):{{r}({b}channel{d},{channel}):{{r}({b}server{d},{server}):{{r}({b}user{d},{user}):{f.title}}}}}\n{=(f.name):{{r}({b}channel{d},{channel}):{{r}({b}server{d},{server}):{{r}({b}user{d},{user}):{f.name}}}}}\n{=(f.footer):{{r}({b}channel{d},{channel}):{{r}({b}server{d},{server}):{{r}({b}user{d},{user}):{f.footer}}}}}\n{=(f.description):{{r}({b}channel(mention){d},{channel(mention)}):{{r}({b}channel{d},{channel}):{{r}({b}server{d},{server}):{{r}({b}mention{d},{user(mention)}):{{r}({b}user(mention){d},{b}mention{d}):{{r}({b}user{d},{user}):{f.description}}}}}}}}\n\n{=(COMMENT):Spaces out the color, then removes the first and last added space}\n{=(sepColor):{{r}(, ):{f.color}}}\n{=(sepColor):{sepColor(2+)}}\n{=(sepColor):{sepColor(+-1)}}\n{=(COMMENT):Sanitize our color to only keep our first 6 characters of it, remove the # sign if any and make every letter uppercase}\n{=(sanitizedColor):{{r}(#,):{lower:{{j}():{sepColor}}}}}\n\n{=(COMMENT):Dictionary of color names, returned as hex. https://htmlcolorcodes.com/color-names/}\n{=(cl.{f.color}):{sanitizedColor(+6)}}\n{=(cl.white):FFFFFF}\n{=(cl.silver):C0C0C0}\n{=(cl.gray):808080}\n{=(cl.grey):{cl.gray}}\n{=(cl.slategray):708090}\n{=(cl.slategrey):{cl.slategray}}\n{=(cl.black):000000}\n{=(cl.red):FF0000}\n{=(cl.yellow):FFFF00}\n{=(cl.lime):00FF00}\n{=(cl.green):008000}\n{=(cl.cyan):00FFFF}\n{=(cl.blue):0000FF}\n{=(cl.navy):000080}\n{=(cl.purple):800080}\n{=(cl.salmon):FA8072}\n{=(cl.pink):FFC0CB}\n{=(cl.coral):FF7F50}\n{=(cl.orange):FFA500}\n{=(cl.gold):FFD700}\n{=(cl.magenta):FF00FF}\n{=(cl.violet):EE82EE}\n{=(cl.indigo):4B0082}\n{=(cl.slateblue):6A5ACD}\n{=(cl.midnightblue):191970}\n{=(cl.wheat):F5DEB3}\n{=(cl.chocolate):F5DEB3}\n\n{=(cl.discord):2F3136}\n{=(cl.embed):{cl.discord}}\n{=(cl.blurple):7289DA}\n\n{=(cl.self):{user(color)}}\n{=(cl.myself):{cl.self}}\n{=(cl.me):{cl.self}}\n\n{=(finalHexColor):{upper:{cl.{lower:{{j}():{f.color}}}}}}\n\n{=(COMMENT):Spacing out our hexadecimal code}\n{=(spacedHex):{{r}(F,15):{{r}(E,14):{{r}(D,13):{{r}(C,12):{{r}(B,11):{{r}(A,10):{{r}(, ):{finalHexColor}}}}}}}}}\n{=(spacedHex):{spacedHex(2+)}}\n{=(spacedHex):{{j}(~):{spacedHex(+-1)}}}\n\n{=(COMMENT):Hex to decimal part}\n{=(finalDecimalColor):{m:trunc({{j}():{spacedHex(0):~}*16^0 + {spacedHex(-1):~}*16^1 + {spacedHex(-2):~}*16^2 + {spacedHex(-3):~}*16^3 + {spacedHex(-4):~}*16^4 + {spacedHex(-5):~}*16^5)}}}\n\n{=(finalJSON):{ \"url\":\"{f.titleurl}\",\n\t\"title\": \"{f.title}\",\n\t\"description\": \"{f.description}\",\n\t\"thumbnail\": {\n\t\t\"url\": \"{f.thumbnail}\"\n\t\t},\n\t\"image\": {\n\t\t\"url\": \"{f.image}\"\n\t\t},\n\t\"author\": {\n\t\t\"name\":\"{f.name}\",\n\t\t\"url\": \"{f.nameurl}\",\n\t\t\"icon_url\": \"{f.nameicon}\"\n\t\t},\n\t\"color\": {finalDecimalColor},\n\t\"footer\": {\n\t\t\"icon_url\": \"{f.footericon}\",\n\t\t\"text\": \"{f.footer}\"\n\t\t},\n\t\"timestamp\": \"{f.timestamp}\"\n\t\t}}\n\n{=(allFields):{{j}():{{r}({fb},):{word1} {word2} {word3} {word4} {word5} {word6} {word7} {word8} {word9} {word10} {word11} {word12}}}}\n\n{=(areAllFieldsEmpty):{{ct}({pl}):{allFields}{pl}}}\n{=(isNoArg):{{ct}({pl}):{a1}{pl}}}\n\n{=(errJSON):{ \"description\": \"No field detected.\\nExample:\n\t `{example}`\",\n\t \"color\": {finalDecimalColor}\n }\n}\n\n{=(errJSON):{ \"fields\": [\n\t{ \"name\": \n\t\t\"Features\",\"value\":\"• **Substring Matching** on each field name (`t` works for `title`, `desc` for `description`, etc.)\\n• Fields names can all be filled and in **any order** of your choice!\\n• Built-in **error messages**, to let you know what's wrong and when.\\n• Ability to specify a color name, hexadecimal color, or even `self` for your own color.\\n• **Custom-made blocks** to use in some fields, like user `{avatar}` and server `{icon}` in image fields, `{server}` and `{channel}` in text fields, and `{channel(mention)}` in the Description field.\\n• Even for non-Nitro users, ability to use **custom emojis** **from other servers**, by using `<emoji` followed by the **emoji ID** and `>`. For example, `<emoji803680930841362442>` would display <:TagScript:803680930841362442>.\\n\",\"inline\":false\n\t},\n\t{ \"name\":\n\t\t\t\"Usage\",\n\t\t\"value\":\n\t\t\t\"`!be fieldName:Content|fieldName:Content`\\n```yaml\\n!be t:My title|d:My description|thumb:https://i.imgur.com/0l0ZBCm.png|image:https://i.imgur.com/0l0ZBCm.png|f:My footer|color:blurple|time:now\\n```\",\n\t\t\"inline\":\n\t\t\tfalse\n\t}],\n\t\"title\":\n\t\t\"Build A Custom Embed\",\n\t\"description\":\n\t\t\"Forget about the built-in `!embed` and `!cembed` commands, that are not customizable nor very user friendly, as they require specific syntax, and the latter a minimum knowledge of what JSON even is, which is not the average person.\",\n\t\"image\":{\n\t\t\"url\":\n\t\t\t\"https://i.imgur.com/SlCjHKv.png\"\n\t\t},\n\t\t\"color\":3092790,\n\t\t\"footer\": {\n\t\t\t\"text\":\"Custom command made with ♥ for TagScript by Asty'#8926\"\n\t\t}\n\t}\n}\n\n{=(JSONs):errJSON finalJSON}\n{=(shouldErr):{in(true):{areAllFieldsEmpty} {isNoArg}}}\n\n{=(JSONIdx):{{i}(true):! {shouldErr} true}}\n\n{=(JSONToSend):{{JSONs({JSONIdx})}}}\n\n{=(debug):__Debug:__\njargs: {jargs}\n\n1: {w1} `{word1}` {content1}\n2: {w2} `{word2}` {content2}\n3: {w3} `{word3}` {content3}\n4: {w4} `{word4}` {content4}\n5: {w5} `{word5}` {content5}\n6: {w6} `{word6}` {content6}\n7: {w7} `{word7}` {content7}\n8: {w8} `{word8}` {content8}\n9: {w9} `{word9}` {content9}\n10: {w10} `{word10}` {content10}\n11: {w11} `{word11}` {content11}\n12: {w12} `{word12}` {content12}\n\nf.image: {f.image}\nf.title: {f.name}\nf.titleurl: {f.name}\nf.name: {f.name}\nf.nameicon: {f.nameicon}\nf.nameurl: {f.nameurl}\n\n**Color**\nf.color: {f.color} - sepColor: {sepColor} - sanitizedColor: {sanitizedColor}\nspacedHex: `{spacedHex}`\nfinalHexColor: `{finalHexColor}`\nfinalDecimalColor: `{finalDecimalColor}`\n\nf.description: {f.description}\nf.thumbnail: {f.thumbnail}\nf.footer: {f.footer}\nf.footericon: {f.footericon}\n\nf.timestamp: {f.timestamp}\n}\n\n{=(testing):Example:```css\n{example}```\nFINAL JSON:```json\n{finalJSON}\n```}\n\n{=(debug2):__Debug 2:__\nareAllFieldsEmpty: {areAllFieldsEmpty}\nisNoArg: {isNoArg}\n\nJSONToSend:```json\n{JSONToSend}\n```\n}\n{c:cembed {channelToSend} {JSONToSend}}\n{override}\n{require({requiredRolesErrorMessage} ):{requiredRoles}}",
"embed": "{}",
"last_fetched": "2026-10-20T18:02:26.961Z"
}