Kurea modules at the moment are loaded from src/modules/ and are part of the bot source code itself. This is not a very nice solution for various reasons.
Instead, we should have Kurea modules be node modules loaded from the node_modules/ folder. The bot would auto-load all modules from there starting with kurea-. This means that modules could be installed using npm install, each person running the bot could have their own sets of modules installed, and each module can have their own dependencies. Most modules currently in the bot would be moved to their own repos as well, making it possible to maintain them all separately too, except for modules considered to be part of the core (mainly those residing in src/modules/core/). The bot should also reload modules when they are modified for some reason (like updating).
Kurea should also have a "module manager" core module, that handles installing and updating Kurea modules - like npm, except accessible from IRC. Modules would be installed by doing either !packages install *module*, or !install *module* (this can be discussed). The command would at the same time add the module to config.json, to keep track of which modules were installed, where they were installed from, without modifying package.json which is part of the bot itself. The same module would automatically check the source each module was installed from.
Potentially, we could have a small node command that would work similarly to the module manager module for Kurea, except accessible from the command-line instead, which would be similar to npm, except for updating config.json instead of packages.json.
Kurea modules at the moment are loaded from
src/modules/
and are part of the bot source code itself. This is not a very nice solution for various reasons.Instead, we should have Kurea modules be node modules loaded from the
node_modules/
folder. The bot would auto-load all modules from there starting withkurea-
. This means that modules could be installed usingnpm install
, each person running the bot could have their own sets of modules installed, and each module can have their own dependencies. Most modules currently in the bot would be moved to their own repos as well, making it possible to maintain them all separately too, except for modules considered to be part of the core (mainly those residing insrc/modules/core/
). The bot should also reload modules when they are modified for some reason (like updating).Kurea should also have a "module manager" core module, that handles installing and updating Kurea modules - like
npm
, except accessible from IRC. Modules would be installed by doing either!packages install *module*
, or!install *module*
(this can be discussed). The command would at the same time add the module toconfig.json
, to keep track of which modules were installed, where they were installed from, without modifyingpackage.json
which is part of the bot itself. The same module would automatically check the source each module was installed from.Potentially, we could have a small node command that would work similarly to the module manager module for Kurea, except accessible from the command-line instead, which would be similar to npm, except for updating
config.json
instead ofpackages.json
.