idkclub / dicebot

🎲 /roll support for Slack
https://dicebot.idk.club
The Unlicense
54 stars 20 forks source link

Cannot divide #13

Closed Mathieu265 closed 7 years ago

Mathieu265 commented 7 years ago

I noticed we can do some math operations ( /roll 2*2 return 4) but when i do /roll 1/2 i get 0 in return.

arkie commented 7 years ago

/roll 2d6 / 2 should work:

@arkie rolled 8 / 2 = 4

Dice Rolls
2d6 6 2

With /roll 1/2 specifically, it's truncating (internally everything is represented as integers). Feel free to re-open if there's a specific case that would make sense to have the decimal representation, and I can look into it.