Humblemonk / DiceMaiden

Dice bot for Discord
Apache License 2.0
125 stars 56 forks source link

Rolling 0dX rolls a die #102

Closed Tronikart closed 4 years ago

Tronikart commented 4 years ago

Describe the bug If you, for any reason, decide to roll no dice at all, the dice rolls anyways

To Reproduce Steps to reproduce the behavior:

  1. !roll 0d6

Expected behavior I know this is something people won't need, but the expected could be either just returning 0 or a message to the user

Humblemonk commented 4 years ago

This is actually expected behavior based on how the ruby gem dice bag operates. The specific code in question:

# Default to at least 1 die. count = 1 if count.zero? || count.nil?

Not going to fix this as I dont think it really breaks anything today.