nisnevich / discord-consensus-bot

A Discord bot for a consensus in decentralised organisations (e.g. DAO). Implements a lazy consensus and full consensus models.
MIT License
5 stars 4 forks source link

Refactor replying in vote.py and grant.py #37

Open nisnevich opened 1 year ago

nisnevich commented 1 year ago

Two improvements can be made in vote.py:

1) make enum ProposalType (with grant or grantless), and simplify checks in cancel_proposal; 2) move the remaining spaghetti code into a function in const.py, and simply pass all parameters to it from cancel_proposal, this will make vote.py much cleaner.

In grant.py accordingly.