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

!roll command #93

Closed viraxor closed 2 years ago

viraxor commented 2 years ago

A command which returns a random number between 1 and the given number. If no number is given, returns a random number between 1 and 10. (#92)

Example:

<viraxor> !roll
<BotB2_tes> viraxor rolls 9!
<viraxor> !roll 100
<BotB2_tes> viraxor rolls 37!
<viraxor> !roll -100
<BotB2_tes> viraxor rolls -83!
viraxor commented 2 years ago

That add timezones commit was accidental (I didn't know what I was doing before, so I merged my timezones branch with the master). It should be the same as the current irc_commands.js file.

TheWing commented 2 years ago

I'd suggest supporting Dice notation with the rolls (or at least a simple XdY+Z thing), it's not terribly complex to implement and offers more variety! https://en.wikipedia.org/wiki/Dice_notation

langel commented 2 years ago

let's give it a roll!