RadBlueDawg / Squire-Discord-Bot

MIT License
0 stars 0 forks source link

Refactor Roll Command #6

Closed RadBlueDawg closed 4 years ago

RadBlueDawg commented 4 years ago

Better Code Hub has indicated that the Squire.py:roll_dice(CTX,DICE) function (the one that holds the !roll command logic) needs refactoring to increase the quality of the codebase. The complaints against it are it's too long and complex. I've been wanting to break out the actual roll logic into a separate method so it could be reused in other commands, like the !rollstats command.

RadBlueDawg commented 4 years ago

The branch points in this function have been reduced from about 16 to 3. The refactor is complete at this point in dev.