Update plugin API docs
parent
b2d9c6ecb1
commit
53dc6edb6a
|
@ -16,6 +16,14 @@ Scroll down to [PluginAPI](#PluginAPI) for a list of properties available to plu
|
|||
<dd></dd>
|
||||
<dt><a href="#PluginHooksAPI">PluginHooksAPI</a> : <code>object</code></dt>
|
||||
<dd></dd>
|
||||
<dt><a href="#PluginDisplayRolesAPI">PluginDisplayRolesAPI</a> : <code>displayRoles</code></dt>
|
||||
<dd></dd>
|
||||
<dt><a href="#PluginThreadsAPI">PluginThreadsAPI</a> : <code>threads</code></dt>
|
||||
<dd></dd>
|
||||
<dt><a href="#PluginWebServerAPI">PluginWebServerAPI</a> : <code>express.Application</code></dt>
|
||||
<dd></dd>
|
||||
<dt><a href="#PluginFormattersAPI">PluginFormattersAPI</a> : <code>FormattersExport</code></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
<a name="PluginAPI"></a>
|
||||
|
@ -33,7 +41,10 @@ Scroll down to [PluginAPI](#PluginAPI) for a list of properties available to plu
|
|||
| attachments | [<code>PluginAttachmentsAPI</code>](#PluginAttachmentsAPI) |
|
||||
| logs | [<code>PluginLogsAPI</code>](#PluginLogsAPI) |
|
||||
| hooks | [<code>PluginHooksAPI</code>](#PluginHooksAPI) |
|
||||
| formats | <code>FormattersExport</code> |
|
||||
| formats | [<code>PluginFormattersAPI</code>](#PluginFormattersAPI) |
|
||||
| webserver | [<code>PluginWebServerAPI</code>](#PluginWebServerAPI) |
|
||||
| threads | [<code>PluginThreadsAPI</code>](#PluginThreadsAPI) |
|
||||
| displayRoles | [<code>PluginDisplayRolesAPI</code>](#PluginDisplayRolesAPI) |
|
||||
|
||||
<a name="PluginCommandsAPI"></a>
|
||||
|
||||
|
@ -85,3 +96,23 @@ Scroll down to [PluginAPI](#PluginAPI) for a list of properties available to plu
|
|||
| beforeNewThread | <code>AddBeforeNewThreadHookFn</code> |
|
||||
| afterThreadClose | <code>AddAfterThreadCloseHookFn</code> |
|
||||
|
||||
<a name="PluginDisplayRolesAPI"></a>
|
||||
|
||||
## PluginDisplayRolesAPI : <code>displayRoles</code>
|
||||
**Kind**: global typedef
|
||||
**See**: https://github.com/Dragory/modmailbot/blob/master/src/data/displayRoles.js
|
||||
<a name="PluginThreadsAPI"></a>
|
||||
|
||||
## PluginThreadsAPI : <code>threads</code>
|
||||
**Kind**: global typedef
|
||||
**See**: https://github.com/Dragory/modmailbot/blob/master/src/data/threads.js
|
||||
<a name="PluginWebServerAPI"></a>
|
||||
|
||||
## PluginWebServerAPI : <code>express.Application</code>
|
||||
**Kind**: global typedef
|
||||
**See**: https://expressjs.com/en/api.html#app
|
||||
<a name="PluginFormattersAPI"></a>
|
||||
|
||||
## PluginFormattersAPI : <code>FormattersExport</code>
|
||||
**Kind**: global typedef
|
||||
**See**: https://github.com/Dragory/modmailbot/blob/master/src/formatters.js
|
||||
|
|
|
@ -73,6 +73,8 @@ The first and only argument to the plugin function is an object with the followi
|
|||
| `hooks` | An object with functions to add *hooks* that are called at specific times, e.g. before a new thread is created |
|
||||
| `formats` | An object with functions that allow you to replace the default functions used for formatting messages and logs |
|
||||
| `webserver` | An [Express Application object](https://expressjs.com/en/api.html#app) that functions as the bot's web server |
|
||||
| `threads` | An object with functions to find and create threads |
|
||||
| `displayRoles` | An object with functions to set and get moderators' display roles |
|
||||
|
||||
See the auto-generated [Plugin API](plugin-api.md) page for details.
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@ const displayRoles = require("./data/displayRoles");
|
|||
* @property {PluginAttachmentsAPI} attachments
|
||||
* @property {PluginLogsAPI} logs
|
||||
* @property {PluginHooksAPI} hooks
|
||||
* @property {FormattersExport} formats
|
||||
* @property {express.Application} webserver
|
||||
* @property {threads} threads
|
||||
* @property {displayRoles} displayRoles
|
||||
* @property {PluginFormattersAPI} formats
|
||||
* @property {PluginWebServerAPI} webserver
|
||||
* @property {PluginThreadsAPI} threads
|
||||
* @property {PluginDisplayRolesAPI} displayRoles
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -49,3 +49,23 @@ const displayRoles = require("./data/displayRoles");
|
|||
* @property {AddBeforeNewThreadHookFn} beforeNewThread
|
||||
* @property {AddAfterThreadCloseHookFn} afterThreadClose
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {displayRoles} PluginDisplayRolesAPI
|
||||
* @see https://github.com/Dragory/modmailbot/blob/master/src/data/displayRoles.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {threads} PluginThreadsAPI
|
||||
* @see https://github.com/Dragory/modmailbot/blob/master/src/data/threads.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {express.Application} PluginWebServerAPI
|
||||
* @see https://expressjs.com/en/api.html#app
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {FormattersExport} PluginFormattersAPI
|
||||
* @see https://github.com/Dragory/modmailbot/blob/master/src/formatters.js
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue