calculate

Privateunrated

Content

20 lines
{=(input):{join():{args}}}
{=(result):{m:{input}}}
{=(valid):{if({m:round(({result})-0.5)}=={m:trunc({result})}):valid|error}}
{=(json.valid):{
    "fields":[
        {
            "name":"Input",
            "value":"`{input}`"
        },
        {
            "name":"Result",
            "value":"`{result}`"
        }
    ]
}}
{=(json.error):{
    "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."
}}
{c:cembed {channel(id)} {json.{valid}}}
Raw JSON
{
  "id": 233621,
  "created_at": "2022-04-26T10:36:44.018Z",
  "tag_name": "calculate",
  "nsfw": false,
  "owner_id": "643448506064961536",
  "uses": 64,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "725448432168337439",
  "sharer": "643448506064961536",
  "content": "{=(input):{join():{args}}}\n{=(result):{m:{input}}}\n{=(valid):{if({m:round(({result})-0.5)}=={m:trunc({result})}):valid|error}}\n{=(json.valid):{\n    \"fields\":[\n        {\n            \"name\":\"Input\",\n            \"value\":\"`{input}`\"\n        },\n        {\n            \"name\":\"Result\",\n            \"value\":\"`{result}`\"\n        }\n    ]\n}}\n{=(json.error):{\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}}\n{c:cembed {channel(id)} {json.{valid}}}",
  "embed": "{}",
  "last_fetched": "2026-10-20T21:50:34.813Z"
}