kncalc

Privateunrated

Content

26 lines
{=(high):{m:trunc({1}*25000)}}
{=(in.high):{replace(st,):{replace(nd,):{replace(rd,):{replace(th,):{ord:{high}}}}}}}
{=(low):{m:trunc({1}*5000)}}
{=(in.low):{replace(st,):{replace(nd,):{replace(rd,):{replace(th,):{ord:{low}}}}}}}
{=(avg):{m:trunc(({high}+{low})/2)}}
{=(in.avg):{replace(st,):{replace(nd,):{replace(rd,):{replace(th,):{ord:{avg}}}}}}}
{=():} {override}
{=(actionrun):c:cembed {channel(id)}}
{=(json):{"title":"Bank Note Calculator","description":"Estimated bank note space: `{in.avg}`\nHighest possible bank note space: `{in.high}`\nLowest possible bank note space: `{in.low}`\n","color":{range:0-16777215},"footer":{"icon_url":"{server(icon)}","text":"Made by Smile#9254"}}}
{=(encoded):{urlencode:{1}}}
{=(length):{index(&$):{args} &$}}
{=(sani):{replace(%28,/g):{replace(%29,/g):{encoded}}}}
{=(jargs):{join(~):{sani}}}
{=(arg1):{list(0):{jargs}}}
{=(spaced):{replace(, ):{arg1}}}
{=(firstChar):{spaced(2)}}
{=(msg.blank):Seems like the argument is blank. Give me a # of bank notes to calculate with.
**Example:** `[p]kncalc <# of bank notes>`}
{=(msg.limited):⛔ Are you sure you have that amount of bank notes?}
{=(msg.invalid):⛔ This doesn't seem like a valid number that I can your calculate bank note space with.
**Usage:** `[p]kncalc <# of bank notes>`}
{=(isArgs):{if(!={firstChar}):true|false}}
{=(isSThan1E5):{if({sani}>100000):true|false}}
{=(isNumber):{if({m:trunc({sani}/1)}=={sani}):true|false}}
{=(isPos):{if({m:sgn({sani})}==-1):false|true}}
{{if({isArgs}==false):c:echo {channel(id)} {msg.blank}|{if({length}>1):msg.invalid|{if({isNumber}==false):msg.invalid|{if({isPos}==false):msg.invalid|{if({isSThan1E5}==true):msg.limited|{actionrun} {json}}}}}}}
Raw JSON
{
  "id": 999172,
  "created_at": "2021-08-10T00:20:23.000Z",
  "tag_name": "kncalc",
  "nsfw": false,
  "owner_id": "705310868929249290",
  "uses": 27,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "779010238753275905",
  "sharer": "705310868929249290",
  "content": "{=(high):{m:trunc({1}*25000)}}\n{=(in.high):{replace(st,):{replace(nd,):{replace(rd,):{replace(th,):{ord:{high}}}}}}}\n{=(low):{m:trunc({1}*5000)}}\n{=(in.low):{replace(st,):{replace(nd,):{replace(rd,):{replace(th,):{ord:{low}}}}}}}\n{=(avg):{m:trunc(({high}+{low})/2)}}\n{=(in.avg):{replace(st,):{replace(nd,):{replace(rd,):{replace(th,):{ord:{avg}}}}}}}\n{=():} {override}\n{=(actionrun):c:cembed {channel(id)}}\n{=(json):{\"title\":\"Bank Note Calculator\",\"description\":\"Estimated bank note space: `{in.avg}`\\nHighest possible bank note space: `{in.high}`\\nLowest possible bank note space: `{in.low}`\\n\",\"color\":{range:0-16777215},\"footer\":{\"icon_url\":\"{server(icon)}\",\"text\":\"Made by Smile#9254\"}}}\n{=(encoded):{urlencode:{1}}}\n{=(length):{index(&$):{args} &$}}\n{=(sani):{replace(%28,/g):{replace(%29,/g):{encoded}}}}\n{=(jargs):{join(~):{sani}}}\n{=(arg1):{list(0):{jargs}}}\n{=(spaced):{replace(, ):{arg1}}}\n{=(firstChar):{spaced(2)}}\n{=(msg.blank):Seems like the argument is blank. Give me a # of bank notes to calculate with.\n**Example:** `[p]kncalc <# of bank notes>`}\n{=(msg.limited):⛔ Are you sure you have that amount of bank notes?}\n{=(msg.invalid):⛔ This doesn't seem like a valid number that I can your calculate bank note space with.\n**Usage:** `[p]kncalc <# of bank notes>`}\n{=(isArgs):{if(!={firstChar}):true|false}}\n{=(isSThan1E5):{if({sani}>100000):true|false}}\n{=(isNumber):{if({m:trunc({sani}/1)}=={sani}):true|false}}\n{=(isPos):{if({m:sgn({sani})}==-1):false|true}}\n{{if({isArgs}==false):c:echo {channel(id)} {msg.blank}|{if({length}>1):msg.invalid|{if({isNumber}==false):msg.invalid|{if({isPos}==false):msg.invalid|{if({isSThan1E5}==true):msg.limited|{actionrun} {json}}}}}}}",
  "embed": "{}",
  "last_fetched": "2026-10-20T17:18:47.029Z"
}