langel / botb_irc_bot

battle of the bits instant relay chat magic
BSD 3-Clause "New" or "Revised" License
11 stars 7 forks source link

add basic rolling (again) #94

Closed viraxor closed 2 years ago

viraxor commented 2 years ago

Uhh, yeah. When I added the roll command, I removed the basic rolling and left just dice notation, but I didn't say anything about this on the PR, thinking that this would be discovered. Because I hadn't explained this, the feature was, shortly after adding, removed because it always returned NaN. So, here is basic rolling and dice notation.

Example:

<viraxor> !roll 100
<BotB2_tes> viraxor rolls 93!
<viraxor> !roll -100
<BotB2_tes> viraxor rolls -58!
<viraxor> !roll d10
<BotB2_tes> viraxor rolls 4!
<viraxor> !roll 2d20
<BotB2_tes> viraxor rolls 36!
<viraxor> !roll 4d40+2d17
<BotB2_tes> viraxor rolls 98!
<viraxor> !roll 30d28-99d95
<BotB2_tes> viraxor rolls -4100! 
viraxor commented 2 years ago

fixed whitespaces!

langel commented 2 years ago

looking good -- can you rebase the 5 commits into 1 for me please?