ramirez/docs/plugin-api.md

3.8 KiB

Plugin API

NOTE: This file is generated automatically.

Scroll down to PluginAPI for a list of properties available to plugins.

Typedefs

PluginAPI : object
PluginCommandsAPI : object
PluginAttachmentsAPI : object
PluginLogsAPI : object
PluginHooksAPI : object
PluginDisplayRolesAPI : displayRoles
PluginThreadsAPI : threads
PluginWebServerAPI : express.Application
PluginFormattersAPI : FormattersExport

PluginAPI : object

Kind: global typedef
Properties

Name Type
bot Client
knex Knex
config ModmailConfig
commands PluginCommandsAPI
attachments PluginAttachmentsAPI
logs PluginLogsAPI
hooks PluginHooksAPI
formats PluginFormattersAPI
webserver PluginWebServerAPI
threads PluginThreadsAPI
displayRoles PluginDisplayRolesAPI

PluginCommandsAPI : object

Kind: global typedef
Properties

Name Type
manager CommandManager
addGlobalCommand AddGlobalCommandFn
addInboxServerCommand AddInboxServerCommandFn
addInboxThreadCommand AddInboxThreadCommandFn
addAlias AddAliasFn

PluginAttachmentsAPI : object

Kind: global typedef
Properties

Name Type
addStorageType AddAttachmentStorageTypeFn
downloadAttachment DownloadAttachmentFn

PluginLogsAPI : object

Kind: global typedef
Properties

Name Type
addStorageType AddLogStorageTypeFn
saveLogToStorage SaveLogToStorageFn
getLogUrl GetLogUrlFn
getLogFile GetLogFileFn
getLogCustomResponse GetLogCustomResponseFn

PluginHooksAPI : object

Kind: global typedef
Properties

Name Type
beforeNewThread AddBeforeNewThreadHookFn
afterThreadClose AddAfterThreadCloseHookFn

PluginDisplayRolesAPI : displayRoles

Kind: global typedef
See: https://github.com/Dragory/modmailbot/blob/master/src/data/displayRoles.js

PluginThreadsAPI : threads

Kind: global typedef
See: https://github.com/Dragory/modmailbot/blob/master/src/data/threads.js

PluginWebServerAPI : express.Application

Kind: global typedef
See: https://expressjs.com/en/api.html#app

PluginFormattersAPI : FormattersExport

Kind: global typedef
See: https://github.com/Dragory/modmailbot/blob/master/src/formatters.js