As you will undoubtedly be able to tell from my code, I'm absolutely new to coding and would really appreciate a bit of help developing my Dice Roller Plugin. The plugin is meant to allow players to roll various dice of their choosing using the format (number of dice)d(dice value)+ or -(modifier), with each of the parenthesis instead being their respective number. Ie: 1d20+5 , 5d30-3 , 2d400 , etc. So far the code: 1) Works flawlessly when performing a single simple d20 roll, which is the default if no other parameters are specified (ie: /roll ). 2) Works flawlessly when performing a single specific roll without a modifier (ie: 1d6 , 1d50 , 1d32) 3)Works to an extent when performing a single specific roll with a modifier. The problem occurs, for whatever reason, when the user attempts to take a negative modifier (ie: 1d5-2). Instead of sending the player a single message containing the result of the roll, it sends the result seven times. I have no idea why this is the case, but the plugin seems to handle positive modifiers just fine (ie: 1d6+3). Aside from that, I can't seem to figure out how to send multiple results depending on the chosen number of dice (ie: 5d20 sending 5 1d20s to the player). How would I go about doing this? Here's a link to my source: https://pastebin.com/ezZW8Kq2 Thanks in advance for both your time and potential suggestions, they're all greatly appreciated.