2020-08-16 16:40:44 -04:00
|
|
|
# Plugin API
|
|
|
|
**NOTE:** This file is generated automatically.
|
|
|
|
|
|
|
|
Scroll down to [PluginAPI](#PluginAPI) for a list of properties available to plugins.
|
|
|
|
|
|
|
|
## Typedefs
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt><a href="#PluginAPI">PluginAPI</a> : <code>object</code></dt>
|
|
|
|
<dd></dd>
|
|
|
|
<dt><a href="#PluginCommandsAPI">PluginCommandsAPI</a> : <code>object</code></dt>
|
|
|
|
<dd></dd>
|
|
|
|
<dt><a href="#PluginAttachmentsAPI">PluginAttachmentsAPI</a> : <code>object</code></dt>
|
|
|
|
<dd></dd>
|
2020-09-22 20:16:26 -04:00
|
|
|
<dt><a href="#PluginLogsAPI">PluginLogsAPI</a> : <code>object</code></dt>
|
|
|
|
<dd></dd>
|
2020-08-16 16:40:44 -04:00
|
|
|
<dt><a href="#PluginHooksAPI">PluginHooksAPI</a> : <code>object</code></dt>
|
|
|
|
<dd></dd>
|
2020-11-01 15:16:15 -05:00
|
|
|
<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>
|
2020-08-16 16:40:44 -04:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
<a name="PluginAPI"></a>
|
|
|
|
|
|
|
|
## PluginAPI : <code>object</code>
|
|
|
|
**Kind**: global typedef
|
|
|
|
**Properties**
|
|
|
|
|
|
|
|
| Name | Type |
|
|
|
|
| --- | --- |
|
|
|
|
| bot | <code>Client</code> |
|
|
|
|
| knex | <code>Knex</code> |
|
|
|
|
| config | <code>ModmailConfig</code> |
|
|
|
|
| commands | [<code>PluginCommandsAPI</code>](#PluginCommandsAPI) |
|
|
|
|
| attachments | [<code>PluginAttachmentsAPI</code>](#PluginAttachmentsAPI) |
|
2020-09-22 20:16:26 -04:00
|
|
|
| logs | [<code>PluginLogsAPI</code>](#PluginLogsAPI) |
|
2020-08-16 16:40:44 -04:00
|
|
|
| hooks | [<code>PluginHooksAPI</code>](#PluginHooksAPI) |
|
2020-11-01 15:16:15 -05:00
|
|
|
| formats | [<code>PluginFormattersAPI</code>](#PluginFormattersAPI) |
|
|
|
|
| webserver | [<code>PluginWebServerAPI</code>](#PluginWebServerAPI) |
|
|
|
|
| threads | [<code>PluginThreadsAPI</code>](#PluginThreadsAPI) |
|
|
|
|
| displayRoles | [<code>PluginDisplayRolesAPI</code>](#PluginDisplayRolesAPI) |
|
2020-08-16 16:40:44 -04:00
|
|
|
|
|
|
|
<a name="PluginCommandsAPI"></a>
|
|
|
|
|
|
|
|
## PluginCommandsAPI : <code>object</code>
|
|
|
|
**Kind**: global typedef
|
|
|
|
**Properties**
|
|
|
|
|
|
|
|
| Name | Type |
|
|
|
|
| --- | --- |
|
|
|
|
| manager | <code>CommandManager</code> |
|
|
|
|
| addGlobalCommand | <code>AddGlobalCommandFn</code> |
|
|
|
|
| addInboxServerCommand | <code>AddInboxServerCommandFn</code> |
|
|
|
|
| addInboxThreadCommand | <code>AddInboxThreadCommandFn</code> |
|
|
|
|
| addAlias | <code>AddAliasFn</code> |
|
|
|
|
|
|
|
|
<a name="PluginAttachmentsAPI"></a>
|
|
|
|
|
|
|
|
## PluginAttachmentsAPI : <code>object</code>
|
|
|
|
**Kind**: global typedef
|
|
|
|
**Properties**
|
|
|
|
|
|
|
|
| Name | Type |
|
|
|
|
| --- | --- |
|
|
|
|
| addStorageType | <code>AddAttachmentStorageTypeFn</code> |
|
|
|
|
| downloadAttachment | <code>DownloadAttachmentFn</code> |
|
2020-11-02 10:37:07 -05:00
|
|
|
| saveAttachment | <code>SaveAttachmentFn</code> |
|
2020-08-16 16:40:44 -04:00
|
|
|
|
2020-09-22 20:16:26 -04:00
|
|
|
<a name="PluginLogsAPI"></a>
|
|
|
|
|
|
|
|
## PluginLogsAPI : <code>object</code>
|
|
|
|
**Kind**: global typedef
|
|
|
|
**Properties**
|
|
|
|
|
|
|
|
| Name | Type |
|
|
|
|
| --- | --- |
|
|
|
|
| addStorageType | <code>AddLogStorageTypeFn</code> |
|
|
|
|
| saveLogToStorage | <code>SaveLogToStorageFn</code> |
|
|
|
|
| getLogUrl | <code>GetLogUrlFn</code> |
|
|
|
|
| getLogFile | <code>GetLogFileFn</code> |
|
|
|
|
| getLogCustomResponse | <code>GetLogCustomResponseFn</code> |
|
|
|
|
|
2020-08-16 16:40:44 -04:00
|
|
|
<a name="PluginHooksAPI"></a>
|
|
|
|
|
|
|
|
## PluginHooksAPI : <code>object</code>
|
|
|
|
**Kind**: global typedef
|
|
|
|
**Properties**
|
|
|
|
|
|
|
|
| Name | Type |
|
|
|
|
| --- | --- |
|
|
|
|
| beforeNewThread | <code>AddBeforeNewThreadHookFn</code> |
|
2020-09-22 20:16:26 -04:00
|
|
|
| afterThreadClose | <code>AddAfterThreadCloseHookFn</code> |
|
2020-08-16 16:40:44 -04:00
|
|
|
|
2020-11-01 15:16:15 -05:00
|
|
|
<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
|