bc

Privateunrated

Content

70 lines
{=(COMMENT):Change the content of the 2 variables below to fit your server, they will be shown in the footer.}
{=(TagName):bc}
{=(prefix):.}

{=(COMMENT):Urlencoded versions of Brackets and Parentheses.}

{=(leftB):%7B}
{=(rightB):%7D}
{=(leftP):%28}
{=(rightP):%29}
{=(uArgs):{urlencode:{args}}} {override}
{=(brackets):{ }}
{=(leftBracket):{brackets(1)}}
{=(rightBracket):{brackets(2)}}

{=(COMMENT):The actual code starts here, don't edit anything if you don't know what each part does.}

{=(COMMENT):Getting the amount of left/right brackets/parentheses.}
{=(leftBCount):{m:trunc({index(###):{replace({leftB},! {leftB}):{uArgs} ###}} -1)}}
{=(rightBCount):{m:trunc({index(###):{replace({rightB},! {rightB}):{uArgs} ###}} -1)}}
{=(leftPCount):{m:trunc({index(###):{replace({leftP},! {leftP}):{uArgs} ###}} -1)}}
{=(rightPCount):{m:trunc({index(###):{replace({rightP},! {rightP}):{uArgs} ###}} -1)}}

{=(bValue):{m:trunc({leftBCount}-{rightBCount})}}
{=(pValue):{m:trunc({leftPCount}-{rightPCount})}}
{=(bValueSign):{m:sgn({bValue})}}
{=(pValueSign):{m:sgn({pValue})}}

{=(COMMENT):Creating the variables that will be displayed in the embed description.}
{=(bMsg0):Brackets are balanced <:GreenTick:699124840879226922>}
{=(bBracket1):**{m:trunc(abs({bValue}))}** extra `{leftBracket}` or **{m:trunc(abs({bValue}))}** missing `{rightBracket}`.}
{=(bBracket-1):**{m:trunc(abs({bValue}))}** extra `{rightBracket}` or **{m:trunc(abs({bValue}))}** missing `{leftBracket}`.}
{=(bMsg1):You have **{leftBCount}** `{leftBracket}` while you have **{rightBCount}** `{rightBracket}` in your code, meaning you either have {bBracket{bValueSign}}}

{=(pMsg0):Parentheses are balanced <:GreenTick:699124840879226922>}
{=(pParen1):**{m:trunc(abs({pValue}))}** extra `(` or **{m:trunc(abs({pValue}))}** missing `)`.}
{=(pParen-1):**{m:trunc(abs({pValue}))}** extra `)` or **{m:trunc(abs({pValue}))}** missing `(`.}
{=(pMsg1):You have **{leftPCount}** `(` while you have **{rightPCount}** `)` in your code, meaning you either have {pParen{pValueSign}}}

{=(COMMENT):Removes the minus sign from the sign of the subtraction.}
{=(bValueSign):{replace(-,):{bValueSign}}}
{=(pValueSign):{replace(-,):{pValueSign}}}

{=(COMMENT):Using replace blocks instead of a bunch of control blocks to send the corresponding message depending on the input.}
{=(noArgs):{replace(0,false):{index(###):{args} ###}}}
{=(hasB):{replace(truetrue,true):{replace(falsetrue,true):{replace(truefalse,true):{replace(falsefalse,false):{in({leftB}):{uArgs}}{in({rightB}):{uArgs}}}}}}}
{=(hasP):{replace(truetrue,true):{replace(falsetrue,true):{replace(truefalse,true):{replace(falsefalse,false):{in({leftP}):{uArgs}}{in({rightP}):{uArgs}}}}}}}

{=(COMMENT):Rest of the messages for the output.}
{=(msgNoArgs):No script provided.}
{=(msgNoB):There are no brackets in this script.}
{=(msgHasAny):• {bMsg{bValueSign}}

{if({hasP}==true):• {pMsg{pValueSign}}}}
{=(msgs):msgNoArgs msgNoB msgHasAny}
{=(idx):{msgs({index(false):! {noArgs} {hasB} false})}}

{=(COMMENT):Variables for the json in the embed.}
{=(em.desc):{{idx}}}
{=(color):16730946 4915012}
{=(trueTrue):{replace(00,0):{replace(11,1):{replace(01,1):{replace(10,1):{bValueSign}{pValueSign}}}}}}
{=(em.color):{color({trueTrue})}}
{=(em.footer):{prefix}{TagName} <code>}
{=(em.title):TagScript Brackets and Parentheses Checker.}

{=(json):{"title":"{em.title}","description":"{em.desc}","color":{em.color},"footer":{"icon_url":"{user(avatar)}","text":"{em.footer}"}}}

{=(COMMENT):Generates the output. This is the end of the tag. Enjoy using the tag reader.}
{=():{{idx}}}
{{if({idx}==msgHasAny):c:cembed {channel(id)} {json}}}
Raw JSON
{
  "id": 1323453,
  "created_at": "2022-04-26T10:38:26.463Z",
  "tag_name": "bc",
  "nsfw": false,
  "owner_id": "904754071045537853",
  "uses": 5,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "941381727501295637",
  "sharer": "904754071045537853",
  "content": "{=(COMMENT):Change the content of the 2 variables below to fit your server, they will be shown in the footer.}\n{=(TagName):bc}\n{=(prefix):.}\n\n{=(COMMENT):Urlencoded versions of Brackets and Parentheses.}\n\n{=(leftB):%7B}\n{=(rightB):%7D}\n{=(leftP):%28}\n{=(rightP):%29}\n{=(uArgs):{urlencode:{args}}} {override}\n{=(brackets):{ }}\n{=(leftBracket):{brackets(1)}}\n{=(rightBracket):{brackets(2)}}\n\n{=(COMMENT):The actual code starts here, don't edit anything if you don't know what each part does.}\n\n{=(COMMENT):Getting the amount of left/right brackets/parentheses.}\n{=(leftBCount):{m:trunc({index(###):{replace({leftB},! {leftB}):{uArgs} ###}} -1)}}\n{=(rightBCount):{m:trunc({index(###):{replace({rightB},! {rightB}):{uArgs} ###}} -1)}}\n{=(leftPCount):{m:trunc({index(###):{replace({leftP},! {leftP}):{uArgs} ###}} -1)}}\n{=(rightPCount):{m:trunc({index(###):{replace({rightP},! {rightP}):{uArgs} ###}} -1)}}\n\n{=(bValue):{m:trunc({leftBCount}-{rightBCount})}}\n{=(pValue):{m:trunc({leftPCount}-{rightPCount})}}\n{=(bValueSign):{m:sgn({bValue})}}\n{=(pValueSign):{m:sgn({pValue})}}\n\n{=(COMMENT):Creating the variables that will be displayed in the embed description.}\n{=(bMsg0):Brackets are balanced <:GreenTick:699124840879226922>}\n{=(bBracket1):**{m:trunc(abs({bValue}))}** extra `{leftBracket}` or **{m:trunc(abs({bValue}))}** missing `{rightBracket}`.}\n{=(bBracket-1):**{m:trunc(abs({bValue}))}** extra `{rightBracket}` or **{m:trunc(abs({bValue}))}** missing `{leftBracket}`.}\n{=(bMsg1):You have **{leftBCount}** `{leftBracket}` while you have **{rightBCount}** `{rightBracket}` in your code, meaning you either have {bBracket{bValueSign}}}\n\n{=(pMsg0):Parentheses are balanced <:GreenTick:699124840879226922>}\n{=(pParen1):**{m:trunc(abs({pValue}))}** extra `(` or **{m:trunc(abs({pValue}))}** missing `)`.}\n{=(pParen-1):**{m:trunc(abs({pValue}))}** extra `)` or **{m:trunc(abs({pValue}))}** missing `(`.}\n{=(pMsg1):You have **{leftPCount}** `(` while you have **{rightPCount}** `)` in your code, meaning you either have {pParen{pValueSign}}}\n\n{=(COMMENT):Removes the minus sign from the sign of the subtraction.}\n{=(bValueSign):{replace(-,):{bValueSign}}}\n{=(pValueSign):{replace(-,):{pValueSign}}}\n\n{=(COMMENT):Using replace blocks instead of a bunch of control blocks to send the corresponding message depending on the input.}\n{=(noArgs):{replace(0,false):{index(###):{args} ###}}}\n{=(hasB):{replace(truetrue,true):{replace(falsetrue,true):{replace(truefalse,true):{replace(falsefalse,false):{in({leftB}):{uArgs}}{in({rightB}):{uArgs}}}}}}}\n{=(hasP):{replace(truetrue,true):{replace(falsetrue,true):{replace(truefalse,true):{replace(falsefalse,false):{in({leftP}):{uArgs}}{in({rightP}):{uArgs}}}}}}}\n\n{=(COMMENT):Rest of the messages for the output.}\n{=(msgNoArgs):No script provided.}\n{=(msgNoB):There are no brackets in this script.}\n{=(msgHasAny):• {bMsg{bValueSign}}\n\n{if({hasP}==true):• {pMsg{pValueSign}}}}\n{=(msgs):msgNoArgs msgNoB msgHasAny}\n{=(idx):{msgs({index(false):! {noArgs} {hasB} false})}}\n\n{=(COMMENT):Variables for the json in the embed.}\n{=(em.desc):{{idx}}}\n{=(color):16730946 4915012}\n{=(trueTrue):{replace(00,0):{replace(11,1):{replace(01,1):{replace(10,1):{bValueSign}{pValueSign}}}}}}\n{=(em.color):{color({trueTrue})}}\n{=(em.footer):{prefix}{TagName} <code>}\n{=(em.title):TagScript Brackets and Parentheses Checker.}\n\n{=(json):{\"title\":\"{em.title}\",\"description\":\"{em.desc}\",\"color\":{em.color},\"footer\":{\"icon_url\":\"{user(avatar)}\",\"text\":\"{em.footer}\"}}}\n\n{=(COMMENT):Generates the output. This is the end of the tag. Enjoy using the tag reader.}\n{=():{{idx}}}\n{{if({idx}==msgHasAny):c:cembed {channel(id)} {json}}}",
  "embed": "{}",
  "last_fetched": "2026-10-20T18:37:30.865Z"
}