ramirez/src/plugins.js

31 lines
751 B
JavaScript
Raw Normal View History

const attachments = require('./data/attachments');
2020-07-13 17:14:31 -04:00
const { beforeNewThread } = require('./hooks');
module.exports = {
getPluginAPI({ bot, knex, config, commands }) {
return {
bot,
knex,
config,
commands: {
manager: commands.manager,
addGlobalCommand: commands.addGlobalCommand,
addInboxServerCommand: commands.addInboxServerCommand,
addInboxThreadCommand: commands.addInboxThreadCommand,
addAlias: commands.addAlias
},
attachments: {
addStorageType: attachments.addStorageType,
downloadAttachment: attachments.downloadAttachment
},
2020-07-13 17:14:31 -04:00
hooks: {
beforeNewThread,
},
};
},
loadPlugin(plugin, api) {
plugin(api);
}
};