Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CALCULATOR
- COMMANDS : 2
- VARIABLES : 0
- AUTHOR : Nothing..#4241
- MODIFIED BY : RedPlay#6353
- -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
- CODE 1
- -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
- Trigger : any
- Code :
- $nomention
- $title[Botuu Calculator]
- $description[```kt
- 0```
- ]
- $addButton[no;calc.7;7;secondary;no;]
- $addButton[no;calc.8;8;secondary;no;]
- $addButton[no;calc.9;9;secondary;no;]
- $addButton[no;calc.x;x;primary;no;]
- $addButton[no;calc.÷;÷;primary;no;]
- $addButton[yes;calc.4;4;secondary;no;]
- $addButton[no;calc.5;5;secondary;no;]
- $addButton[no;calc.6;6;secondary;no;]
- $addButton[no;calc.+;+;primary;no;]
- $addButton[no;calc.-;-;primary;no;]
- $addButton[yes;calc.1;1;secondary;no;]
- $addButton[no;calc.2;2;secondary;no;]
- $addButton[no;calc.3;3;secondary;no;]
- $addButton[no;calc.(;(;primary;no;]
- $addButton[no;calc.););primary;no;]
- $addButton[yes;calc.0;0;secondary;no;]
- $addButton[no;calc.00;00;secondary;no;]
- $addButton[no;calc.#;=;success;no;]
- $addButton[no;calc.<;<;danger;no;]
- $addButton[no;calc.ac;AC;danger;no;]
- -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
- CODE 2
- -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
- Trigger : $onInteraction
- Code :
- $nomention
- $enableDecimals[yes]
- $suppressErrors[Hey <@$authorID>, your expression seems strange!]
- $onlyIf[$cropText[$customID;5;]==calc.;]
- $textSplit[$replaceText[$replaceText[$getEmbedData[$channelID;$messageID;1;description];```;;2];kt;;1];]
- $var[calc;$replaceText[$replaceText[$getEmbedData[$channelID;$messageID;1;description];```;;2];kt;;1]]
- $var[history;$getEmbedData[$channelID;$messageID;1;footer]]
- $if[$customID==calc.1]
- $var[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷];false;$var[calc]1;-1];true;$var[calc] 1;-1]]
- $endif
- $if[$customID==calc.2]
- $var[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷];false;$var[calc]2;-1];true;$var[calc] 2;-1]]
- $endif
- $if[$customID==calc.3]
- $var[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷];false;$var[calc]3;-1];true;$var[calc] 3;-1]]
- $endif
- $if[$customID==calc.4]
- $var[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷];false;$var[calc]4;-1];true;$var[calc] 4;-1]]
- $endif
- $if[$customID==calc.5]
- $var[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷];false;$var[calc]5;-1];true;$var[calc] 5;-1]]
- $endif
- $if[$customID==calc.6]
- $var[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷];false;$var[calc]6;-1];true;$var[calc] 6;-1]]
- $endif
- $if[$customID==calc.7]
- $var[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷];false;$var[calc]7;-1];true;$var[calc] 7;-1]]
- $endif
- $if[$customID==calc.8]
- $var[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷];false;$var[calc]8;-1];true;$var[calc] 8;-1]]
- $endif
- $if[$customID==calc.9]
- $var[Calculator;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷];false;$var[calc]9;-1];true;$var[calc] 9;-1]]
- $endif
- $if[$customID==calc.0]
- $var[Calculator;$replaceText[$replaceText[$checkCondition[$splitText[$getTextSplitLength]==0];true;$var[calc];-1];false;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷];false;$var[calc]0;-1];true;$var[calc] 0;-1];-1]]
- $endif
- $if[$customID==calc.00]
- $var[Calculator;$replaceText[$replaceText[$checkCondition[$splitText[$getTextSplitLength]==0];true;$var[calc];-1];false;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷];false;$var[calc]00;-1];true;$var[calc] 0;-1];-1]]
- $endif
- $if[$customID==calc.000]
- $var[Calculator;$replaceText[$replaceText[$checkCondition[$splitText[$getTextSplitLength]==0];true;$var[calc];-1];false;$replaceText[$replaceText[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷];false;$var[calc]000;-1];true;$var[calc] 0;-1];-1]]
- $endif
- $if[$customID==calc.÷]
- $onlyIf[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷;(]==false;Hey <@$authorID>, you already have an operator at the end that is $splitText[$getTextSplitLength]]
- $var[Calculator;$var[calc] ÷]
- $endif
- $if[$customID==calc.x]
- $onlyIf[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷;(]==false;Hey <@$authorID>, you already have an operator at the end that is $splitText[$getTextSplitLength]]
- $var[Calculator;$var[calc] ×]
- $endif
- $if[$customID==calc.+]
- $onlyIf[$checkContains[$splitText[$getTextSplitLength];+;-;×;(;÷]==false;Hey <@$authorID>, you already have an operator at the end that is $splitText[$getTextSplitLength]]
- $var[Calculator;$var[calc] +]
- $endif
- $if[$customID==calc.(]
- $if[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷]==false]
- $var[Calculator;$var[calc] × (]
- $else
- $var[Calculator;$var[calc] (]
- $endif
- $endif
- $if[$customID==calc.)]
- $onlyIf[$checkContains[$splitText[$getTextSplitLength];+;-;×;÷;(]==false;Hey <@$authorID>, you have an operator at the end that is $splitText[$getTextSplitLength]! So `)` cant be placed without any numeric intiger at last!]]
- $var[Calculator;$var[calc])]
- $endif
- $if[$customID==calc.-]
- $onlyIf[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷]==false;Hey <@$authorID>, you already have an operator at the end that is $splitText[$getTextSplitLength]]
- $var[Calculator;$var[calc] -]
- $endif
- $if[$customID==calc.#]
- $onlyIf[$checkContains[$var[calc];+;-;×;÷]==true;Hey <@$authorID>, you haven't chosen any operator in your calculation yet please choose one]
- $onlyIf[$checkContains[$splitText[$getTextSplitLength];+;-;x;÷]==false;Hey <@$authorID>, your calculation ends with an operator which kinda doesn't make any sense]
- $var[Calculator;$calculate[$replaceText[$replaceText[$var[calc];×;*;-1];÷;/;-1]]]
- $var[history;$var[calc] = $var[Calculator]
- $var[history]]
- $endif
- $if[$customID==calc.ac]
- $var[Calculator;0]
- $endif
- $if[$customID==calc.<]
- $removeSplitTextElement[$getTextSplitLength]
- $var[Calculator;$joinSplitText[]]
- $endif
- $title[Botuu Calculator]
- $footer[$cropText[$var[history];300;...]]
- $description[```kt
- $var[Calculator]```]
- $c[Author : Nothing..#4241, Modified by : RedPlay#6353]
- -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Advertisement
Add Comment
Please, Sign In to add comment