diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d6fa76..ed335f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ Please report any bugs you encounter by [creating a GitHub issue](https://github **General changes:** * Fix occasional bug with expiring blocks where the bot would send the expiry message multiple times +* Plugins can now also be installed from NPM modules + * Example: `plugins[] = npm:some-plugin-package` **Plugins:** * Log storage functions `getLogUrl()`, `getLogFile()`, `getLogCustomResponse()` now take the entire thread object as an argument rather than the thread ID diff --git a/docs/plugins.md b/docs/plugins.md index b323f38..b264533 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -2,9 +2,15 @@ The bot supports loading external plugins. ## Specifying plugins to load -For each plugin file you'd like to load, add the file path to the [`plugins` option](configuration.md#plugins). -The path is relative to the bot's folder. -Plugins are automatically loaded on bot startup. +Plugins can be loaded either from local files or NPM. Examples: +```ini +# Local file +plugins[] = ./path/to/plugin.js +# NPM package +plugins[] = npm:some-plugin-package +``` +Paths to local files are always relative to the bot's folder. +NPM plugins are automatically installed on bot start-up. ## Creating a plugin Plugins are simply `.js` files that export a function that gets called when the plugin is loaded.