calc
Privateunrated
Content
22 lines{=(largs):{lower:{args}}}
{=(COMMENT):This is the part that does the math based on the user input, truncatenates conditionally, puts commas every 3 digits in the result, and replaces the output with an error message when the input was invalid. All of that in that one single line and with no "if" block whatsoever.}
{=(equation):{replace(Z,):{replace(.0Z,):{m:{replace(π,pi):{replace(sqrt,^(1/2)):{replace(÷,/):{replace(x,*):{replace(m,e6):{replace(k,e3):{replace( ,):{largs}}}}}}}}}Z}}}
{=(equation):{replace(<o error>,Error. Invalid input.):{replace(st,):{replace(nd,):{replace(rd,):{replace(th,):{ord:{equation(1):.}}{if({equation(2+):.}!=):.{equation(2+):.}}}}}}}}
{=(COMMENT):Title and thumbnail of the embed.}
{=(title):Server Calculator}
{=(thumbnail):{replace(1200px,250px):https://cdn.discordapp.com/attachments/767787659997216808/775574027254890496/apple-calculator.png}}
{=(COMMENT):Conditional input to display. Returns a space when no argument is provided, just so it doesn't display two "`" characters.}
{=(input):{if({1}==):None|{replace( ,):{largs}}}}
{=(COMMENT):Conditional output to display.}
{=(error):You need to specify an equation to calculate.}
{=(output):{if({1}==):{error}|{equation}}}
{=(COMMENT):Conditional embed's side color. Red if no argument or invalid input; otherwise gray/transparent.}
{=(clr.red):F80E0E}
{=(clr.gray):2f3136}
{=(em.color):{if({1}==):{clr.red}|{if({in(Error. Invalid input.):{equation}}==true):{clr.red}|{clr.gray}}}}
{embed(color):#{em.color}}Embed
1 line{"color": 5198940, "fields": [{"name": "Input", "value": "`{input}`", "inline": false}, {"name": "Output", "value": "`{output}`", "inline": false}], "footer": {"text": "Server Calculator v1.2", "icon_url": "https://cdn.discordapp.com/attachments/752260956662530181/814744497203445770/823090484125712emoji.gif"}, "thumbnail": {"url": "{thumbnail}"}}Raw JSON
{
"id": 599893,
"created_at": "2021-02-11T18:33:45.000Z",
"tag_name": "calc",
"nsfw": false,
"owner_id": "683373230198620166",
"uses": 26,
"description": null,
"restricted": false,
"shared": false,
"deleted": false,
"safe": "unrated",
"hidden": false,
"guild_id": "671624957419323402",
"sharer": "517028904804810772",
"content": "{=(largs):{lower:{args}}}\n\n{=(COMMENT):This is the part that does the math based on the user input, truncatenates conditionally, puts commas every 3 digits in the result, and replaces the output with an error message when the input was invalid. All of that in that one single line and with no \"if\" block whatsoever.}\n{=(equation):{replace(Z,):{replace(.0Z,):{m:{replace(π,pi):{replace(sqrt,^(1/2)):{replace(÷,/):{replace(x,*):{replace(m,e6):{replace(k,e3):{replace( ,):{largs}}}}}}}}}Z}}}\n{=(equation):{replace(<o error>,Error. Invalid input.):{replace(st,):{replace(nd,):{replace(rd,):{replace(th,):{ord:{equation(1):.}}{if({equation(2+):.}!=):.{equation(2+):.}}}}}}}}\n\n{=(COMMENT):Title and thumbnail of the embed.}\n{=(title):Server Calculator}\n{=(thumbnail):{replace(1200px,250px):https://cdn.discordapp.com/attachments/767787659997216808/775574027254890496/apple-calculator.png}}\n\n{=(COMMENT):Conditional input to display. Returns a space when no argument is provided, just so it doesn't display two \"`\" characters.}\n{=(input):{if({1}==):None|{replace( ,):{largs}}}}\n\n{=(COMMENT):Conditional output to display.}\n{=(error):You need to specify an equation to calculate.}\n{=(output):{if({1}==):{error}|{equation}}}\n\n{=(COMMENT):Conditional embed's side color. Red if no argument or invalid input; otherwise gray/transparent.}\n{=(clr.red):F80E0E}\n{=(clr.gray):2f3136}\n{=(em.color):{if({1}==):{clr.red}|{if({in(Error. Invalid input.):{equation}}==true):{clr.red}|{clr.gray}}}}\n{embed(color):#{em.color}}",
"embed": "{\"color\": 5198940, \"fields\": [{\"name\": \"Input\", \"value\": \"`{input}`\", \"inline\": false}, {\"name\": \"Output\", \"value\": \"`{output}`\", \"inline\": false}], \"footer\": {\"text\": \"Server Calculator v1.2\", \"icon_url\": \"https://cdn.discordapp.com/attachments/752260956662530181/814744497203445770/823090484125712emoji.gif\"}, \"thumbnail\": {\"url\": \"{thumbnail}\"}}",
"last_fetched": "2026-10-21T00:14:38.806Z"
}