Humblemonk / DiceMaiden

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

BUG: Bulk roll error when custom prefix not used #134

Closed diztracshon closed 3 years ago

diztracshon commented 3 years ago

Describe the bug When attempting a bulk roll with the k modifier using the default syntax (that is: "!roll 6 4d6 k3") when there is a custom prefix set (in this case: "!r") Dice Maiden responds with "Error: Extra numbers detected!"

To Reproduce Steps to reproduce the behavior:

  1. Set the prefix with "!dm prefix r"
  2. Type "!roll 6 4d6 k3"
  3. Dice Maiden returns the error

Expected behavior Expected behaviour is Dice Maiden outputting a set of 6 rolls of 4d6 dropping the lowest dice, eg: "User Rolls: [6, 3, 3, 1] Result: 12 [5, 4, 3, 2] Result: 12 [3, 1, 1, 1] Result: 5 [6, 5, 2, 1] Result: 13 [6, 5, 3, 1] Result: 14 [6, 3, 2, 1] Result: 11"

Screenshots bulk roll

Additional context This appears to only happen when a custom prefix is set.

Humblemonk commented 3 years ago

Thanks for the report. I am noticing that the bot is ignoring the custom prefix right now for other rolls as well. Going to look into this asap.

What should be happening here is if a server has set a custom prefix, then !roll should not work at all. Any roll attempt with !roll should be silently dropped. This is not the case atm

Humblemonk commented 3 years ago

A fix for this is being deployed now

diztracshon commented 3 years ago

Cool, the fix is working for me, will I close the report?

Humblemonk commented 3 years ago

I got it. Thanks again for the submission!

diztracshon commented 3 years ago

No prob, thanks for the bot, best I've used so far