helmasaur / bioman

A super sentai Discord bot.
MIT License
1 stars 0 forks source link

Roll command always returns an error #137

Closed helmasaur closed 4 years ago

helmasaur commented 4 years ago

Even if it's a right value format, the command always returns the wrong value argument.

helmasaur commented 4 years ago

Actually, it returns this error when the string starts with an integer (example: 2d6). It is because parseInt() returns true if a string starts with an integer.

helmasaur commented 4 years ago

Ticket oppened in the concerned project: https://github.com/HDTran/trpg-dice/issues/15.

(Use of this regular expression: ^-*[0-9]*d*$.)