aboutsummaryrefslogtreecommitdiff
path: root/src/plugins.js
diff options
context:
space:
mode:
authorSin-MacBook <[email protected]>2020-08-10 23:44:20 +0200
committerSin-MacBook <[email protected]>2020-08-10 23:44:20 +0200
commit2a53887abba882bf7b63aeda8dfa55fdb3ab8792 (patch)
treead7a95eb41faa6ff13c3142285cdc0eb3ca92183 /src/plugins.js
downloadmodmail-2a53887abba882bf7b63aeda8dfa55fdb3ab8792.tar.xz
modmail-2a53887abba882bf7b63aeda8dfa55fdb3ab8792.zip
clean this up when home
Diffstat (limited to 'src/plugins.js')
-rw-r--r--src/plugins.js26
1 files changed, 26 insertions, 0 deletions
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);
+ }
+};