ramirez/src/pluginApi.js

35 lines
977 B
JavaScript
Raw Normal View History

2020-08-16 16:26:04 -04:00
const { CommandManager } = require("knub-command-manager");
const { Client } = require("eris");
const Knex = require("knex");
/**
* @typedef {object} PluginAPI
* @property {Client} bot
* @property {Knex} knex
* @property {ModmailConfig} config
* @property {PluginCommandsAPI} commands
* @property {PluginAttachmentsAPI} attachments
* @property {PluginHooksAPI} hooks
* @property {FormattersExport} formats
*/
/**
* @typedef {object} PluginCommandsAPI
* @property {CommandManager} manager
* @property {AddGlobalCommandFn} addGlobalCommand
* @property {AddInboxServerCommandFn} addInboxServerCommand
* @property {AddInboxThreadCommandFn} addInboxThreadCommand
* @property {AddAliasFn} addAlias
*/
/**
* @typedef {object} PluginAttachmentsAPI
* @property {AddAttachmentStorageTypeFn} addStorageType
* @property {DownloadAttachmentFn} downloadAttachment
*/
/**
* @typedef {object} PluginHooksAPI
* @property {AddBeforeNewThreadHookFn} beforeNewThread
*/