Plugins - noobot/noobot GitHub Wiki
Plugins
are initialised and run once when the bot is connects to Slack. All plugins
must implement the IPlugin
interface and are defined to be used in the PluginManager
found in src/Noobot.Custom/PluginManager
in a similar fashion to the PipelineManager
protected override void Initialise()
{
Use<PingPlugin>();
}
Please note: the ordering of the plugins are NOT important.
Plugins have a Start
and a Stop
method and are only constructed
ONCE, this means if you add a dependency to a plugin
in middleware
, then you will always get the same plugin
. This enables you to communicate, store and manipulate data in a single place for a domain.
For plugins
to communicate with Slack, it must take a dependency
on ISlackWrapper
which will give the plugin
methods for sending messages, getting channel ids and user ids (more functionality will be added when required).