Closed bfbachmann closed 6 years ago
To be honest I don't think this Plugin
abstraction actually provides devs much functionality that wasn't already there. That being said, what I think is useful about it is that it lowers the barrier to entry to newcomers. You no longer have to understand much about Rocket internals to implement some commands or event handlers, you just have to look at the plugin interface and copy it. It also allows us to separate chunks of code that perform similar work into their own package rather than having to keep putting more stuff into the bot
package.
This PR adds a
plugin
package that allows users to write their own plugin types that implement thePlugin
interface. These plugins can expose their own Slack event handlers and commands to theBot
(unfortunately they will have to rely heavily on the bot for access to the DB, the Slack API, logging, the GitHub API and so on).Note that much of the diff in this rather large PR is just be refactoring existing Rocket commands into their own
Core
plugin.