ghost-discord / ghost

🤖 A modular, multi-feature Discord bot
GNU General Public License v3.0
23 stars 31 forks source link

External module loader #26

Open zzzowoey opened 5 years ago

zzzowoey commented 5 years ago

Being able to load modules externally (i.e. from a folder next to the .jar) would be a great extension of the module system. Theoretically, implementing this shouldn't be terribly hard with the way that module loading and invocation works right now; at the very least, we'd have to make moduleClasses in CommandRegistry a class-level member and add a tryLoadModule() method. Dynamically loading and unloading module files at runtime would easily be possible with the NIO WatchService API.