From 2a53887abba882bf7b63aeda8dfa55fdb3ab8792 Mon Sep 17 00:00:00 2001 From: Sin-MacBook Date: Mon, 10 Aug 2020 23:44:20 +0200 Subject: clean this up when home --- src/plugins.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/plugins.js (limited to 'src/plugins.js') diff --git a/src/plugins.js b/src/plugins.js new file mode 100644 index 0000000..64c9df6 --- /dev/null +++ b/src/plugins.js @@ -0,0 +1,26 @@ +const attachments = require('./data/attachments'); + +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 + }, + }; + }, + + loadPlugin(plugin, api) { + plugin(api); + } +}; -- cgit v1.2.3