calculate

Private

Content

27 lines
{=(equation):{replace(**,^):{join():{lower:{args}}}}}
{=(result):{m:{equation}}}
{=(check):{if({m:{result}}=={m:{m:{result}}}):true|false}}
{=(result):{replace(a,):{replace(.0a,):{result}a}}}
{=(success):{
    "title": "Calculation",
    "fields": [
        {
            "name": "Input",
            "value": "`{args}`",
            "inline": false
        },
        {
            "name": "Result",
            "value": "`{result}`",
            "inline": false
        }
    ],
    "color": 7506394
}}
{=(fail):{
    "title": "Invalid input",
    "description": "Check the [documentation](https://docs.carl.gg/tags-and-triggers/tags-advanced-usage/#math-blocks) for all supported mathematical operations, functions and variables.",
    "color": 15158332
}}

{c:cembed {{if({check}==true):success|fail}}}
Raw JSON
{
  "id": 663252,
  "created_at": "2021-03-09T16:11:51.000Z",
  "tag_name": "calculate",
  "nsfw": false,
  "owner_id": "643448506064961536",
  "uses": 37,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "",
  "hidden": false,
  "guild_id": "736603477416869919",
  "sharer": "643448506064961536",
  "content": "{=(equation):{replace(**,^):{join():{lower:{args}}}}}\n{=(result):{m:{equation}}}\n{=(check):{if({m:{result}}=={m:{m:{result}}}):true|false}}\n{=(result):{replace(a,):{replace(.0a,):{result}a}}}\n{=(success):{\n    \"title\": \"Calculation\",\n    \"fields\": [\n        {\n            \"name\": \"Input\",\n            \"value\": \"`{args}`\",\n            \"inline\": false\n        },\n        {\n            \"name\": \"Result\",\n            \"value\": \"`{result}`\",\n            \"inline\": false\n        }\n    ],\n    \"color\": 7506394\n}}\n{=(fail):{\n    \"title\": \"Invalid input\",\n    \"description\": \"Check the [documentation](https://docs.carl.gg/tags-and-triggers/tags-advanced-usage/#math-blocks) for all supported mathematical operations, functions and variables.\",\n    \"color\": 15158332\n}}\n\n{c:cembed {{if({check}==true):success|fail}}}",
  "embed": "{}",
  "last_fetched": "2026-10-21T00:37:13.642Z"
}