Migrate shared framework to use commando
Archomeda opened this issue · 0 comments
Currently the bot has its own custom framework for its commands. It works good enough, but now that this bot has a docker image and node 7/8 is more mainstream (and also because the bot already requires 8 for a while now), using commando as the command framework makes more sense. It offloads the command system to a third party library which makes my life easier.
Commando makes use of discord.js as well, but the file structure will be completely different. As of right now:
- Commands will be mostly handled by commando, the class definitions will have to be updated; commando also introduces command groups
- Workers are still custom implemented and will require some changes in order to integrate with the revised framework
- Localization will require some small updates
- Settings will be overhauled; commando introduces discord server separate settings, which means that only bot specific configuration settings need to be configured in a global config file, while all other settings can be configured through commands when the bot is running
- Database and cache system will mostly stay the same and require some minimal updates to paths and possible renamed functions
- Modules will still be a part of the bot, but it will now instead focus more on grouping commands and workers in the backend; previously it also grouped the commands, but commando's command groups will take over that job (basically the new role is to just group all related things together to support add-ons)
- Permissions will most likely not be migrated in its current state, as it's too complicated to understand and it doesn't really work in commando; instead the permission system of commando will most likely be adopted, which involves discord roles that's more dynamic to set up with servers
With the revised framework it will be even more easy to implement your own bot as the framework and the various modules can be made into separate repositories and npm packages. But it will probably have to be more stable before I'll do that.
And another positive side effect: commando is made for use with multiple servers if needed, so yay 🎉