per
Privateunrated
Content
56 lines{=(COMMENT):Emoji used as a "bullet point" for the instructions.}
{=(twr):<:happyfrog:777542410958798858>}
{=(prefix):?}
{=(tagname):per}
{=(example):{twr} — **How do I use the Dank Bank % Calculator?**
You would use it like you would any normal calculator. If something goes wrong, the bot will tell you. You can use it to calculate Dank tax (the amount you will lose) when sending/receiving coins or to work out the interest rates if you’re taking out a loan from the bank.
*Here are some examples example:*
**What is % of x?**
`?per 5% of 200000`
**What is the % increase/decrease?**
`?per 900000 + 10%`
`?per 500000 - 5%`
**What is x/y in %?**
`?per 5/156`}
{=(COMMENT):Creates artificial named options depending on some conditions. Returns "fail" when none is met.}
{=(option):{if({in(/):{args}}==true):outof|{if({in(of):{args}}==true):perof|{if({in(+):{args}}==true):increase|{if({in(-):{args}}==true):decrease|fail}}}}}
{=(COMMENT):Sets the actual numbers to use in each of their corresponding formula later.}
{=(num.outof):{replace( ,):{args(1):/}} {replace( ,$&):{args(2):/}}}
{=(num.perof):{replace( ,):{args(1):%}} {replace( ,$&):{args(2): of }}}
{=(num.increase):{replace( ,):{args(1):+}} {replace( ,$&):{replace(%,):{args(2):+}}}}
{=(num.decrease):{replace( ,):{args(1):-}} {replace( ,$&):{replace(%,):{args(2):-}}}}
{=(COMMENT):Grabs the first and second item of the number variable above to actually be able to use them.}
{=(num1):{num.{option}(1)}}
{=(prenum2):{num.{option}(2)}}
{=(COMMENT):The "$&" part allows the user to type spaces and even text freely after their query for more versality.}
{=(num2):{prenum2(2):$&}}
{=(COMMENT):Math formula of each option.}
{=(form.outof):{m:{num1}*100/{num2}}Z%}
{=(form.perof):{m:{num2}*{num1}/100}}
{=(form.increase):{m:abs({num1}*(100+{num2})/100)}Z}
{=(form.decrease):{m:abs({num1}*(100-{num2})/100)}Z}
{=(COMMENT):Result, with .0 removed when the result should be truncated.}
{=(result):{replace(%,):{replace(Z,):{replace(.0Z,):{form.{option}}}}}}
{=(COMMENT):Rounded result, with a custom amount of decimals.}
{=(decimals):2}
{=(rresult):{m:round({result}*10^{decimals})/10^{decimals}}{if({option}==outof):%}}
{=(COMMENT):Conditional title depending on the option found.}
{=(title.outof):Percentage of {num1}/{num2}:}
{=(title.perof):{num1}% of {num2}:}
{=(title.increase):{num1} + {num2}%:}
{=(title.decrease):{num1} - {num2}%:}
{=(COMMENT):The *only* thing we call in the embed's field as the output. Returns the instructions if no argument or no available option is found, otherwise returns a custom title and the query's result.}
{=(title):{title.{option}}}
{=(output):{any({1}==|{option}==fail):{example}|**{title}**
{rresult}}}Embed
1 line{"color": 4289797, "title": "Dank Bank % Calculator ", "footer": {"text": "Use ?per for instructions or ?bank for information"}, "thumbnail": {"url": "https://images-ext-2.discordapp.net/external/ZB96qoiOZIimMUudpQT8JwAf8Gz2YpDLursLXudnHxk/%3Fsize%3D1024/https/cdn.discordapp.com/avatars/809407574600450080/f30e9a511f856da29b56b002fdbd74d0.png"}, "description": "{output}"}Raw JSON
{
"id": 680489,
"created_at": "2021-03-16T14:50:43.000Z",
"tag_name": "per",
"nsfw": false,
"owner_id": "662407182909964288",
"uses": 50,
"description": null,
"restricted": false,
"shared": false,
"deleted": false,
"safe": "unrated",
"hidden": false,
"guild_id": "760554279249117264",
"sharer": "662407182909964288",
"content": "{=(COMMENT):Emoji used as a \"bullet point\" for the instructions.}\n{=(twr):<:happyfrog:777542410958798858>}\n{=(prefix):?}\n{=(tagname):per}\n\n{=(example):{twr} — **How do I use the Dank Bank % Calculator?**\nYou would use it like you would any normal calculator. If something goes wrong, the bot will tell you. You can use it to calculate Dank tax (the amount you will lose) when sending/receiving coins or to work out the interest rates if you’re taking out a loan from the bank. \n*Here are some examples example:*\n\n**What is % of x?**\n`?per 5% of 200000`\n\n**What is the % increase/decrease?**\n`?per 900000 + 10%`\n`?per 500000 - 5%`\n\n**What is x/y in %?**\n`?per 5/156`}\n\n{=(COMMENT):Creates artificial named options depending on some conditions. Returns \"fail\" when none is met.}\n{=(option):{if({in(/):{args}}==true):outof|{if({in(of):{args}}==true):perof|{if({in(+):{args}}==true):increase|{if({in(-):{args}}==true):decrease|fail}}}}}\n\n{=(COMMENT):Sets the actual numbers to use in each of their corresponding formula later.}\n{=(num.outof):{replace( ,):{args(1):/}} {replace( ,$&):{args(2):/}}}\n{=(num.perof):{replace( ,):{args(1):%}} {replace( ,$&):{args(2): of }}}\n{=(num.increase):{replace( ,):{args(1):+}} {replace( ,$&):{replace(%,):{args(2):+}}}}\n{=(num.decrease):{replace( ,):{args(1):-}} {replace( ,$&):{replace(%,):{args(2):-}}}}\n\n{=(COMMENT):Grabs the first and second item of the number variable above to actually be able to use them.}\n{=(num1):{num.{option}(1)}}\n{=(prenum2):{num.{option}(2)}}\n{=(COMMENT):The \"$&\" part allows the user to type spaces and even text freely after their query for more versality.}\n{=(num2):{prenum2(2):$&}}\n\n{=(COMMENT):Math formula of each option.}\n{=(form.outof):{m:{num1}*100/{num2}}Z%}\n{=(form.perof):{m:{num2}*{num1}/100}}\n{=(form.increase):{m:abs({num1}*(100+{num2})/100)}Z}\n{=(form.decrease):{m:abs({num1}*(100-{num2})/100)}Z}\n\n{=(COMMENT):Result, with .0 removed when the result should be truncated.}\n{=(result):{replace(%,):{replace(Z,):{replace(.0Z,):{form.{option}}}}}}\n{=(COMMENT):Rounded result, with a custom amount of decimals.}\n{=(decimals):2}\n{=(rresult):{m:round({result}*10^{decimals})/10^{decimals}}{if({option}==outof):%}}\n\n{=(COMMENT):Conditional title depending on the option found.}\n{=(title.outof):Percentage of {num1}/{num2}:}\n{=(title.perof):{num1}% of {num2}:}\n{=(title.increase):{num1} + {num2}%:}\n{=(title.decrease):{num1} - {num2}%:}\n\n{=(COMMENT):The *only* thing we call in the embed's field as the output. Returns the instructions if no argument or no available option is found, otherwise returns a custom title and the query's result.}\n{=(title):{title.{option}}}\n{=(output):{any({1}==|{option}==fail):{example}|**{title}**\n{rresult}}}",
"embed": "{\"color\": 4289797, \"title\": \"Dank Bank % Calculator \", \"footer\": {\"text\": \"Use ?per for instructions or ?bank for information\"}, \"thumbnail\": {\"url\": \"https://images-ext-2.discordapp.net/external/ZB96qoiOZIimMUudpQT8JwAf8Gz2YpDLursLXudnHxk/%3Fsize%3D1024/https/cdn.discordapp.com/avatars/809407574600450080/f30e9a511f856da29b56b002fdbd74d0.png\"}, \"description\": \"{output}\"}",
"last_fetched": "2026-10-21T00:42:31.670Z"
}