Skip to content

Plugins

Simon Schürrle edited this page Aug 3, 2018 · 6 revisions

Plugins

Plugins let you extend the bot with new functionality without touching source code of the bot.

Using plugins

To use a plugin, put it in this directory and add its name to plugins array in config.js.

If plugins is undefined, no plugins are loaded. However, this behaviour may change, don't rely on it. If you want no plugins to be loaded, explicitly set it to an empty array.

Creating a plugin

A plugin is basically "requirable" (JS file, or directory with index.js) which exports a valid Telegraf handler (usually function or Composer instance).

Plugins are similar to [micro-bot] bots.

Known Plugins

Code Detection Plugin
Plugin adding /delete command

Clone this wiki locally