From 815825de94a42470d6fc4c755375f18a5fdf7a28 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Tue, 14 Jul 2020 00:14:31 +0300 Subject: [PATCH] Add hooks to plugin API --- src/plugins.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins.js b/src/plugins.js index 64c9df6..87bb687 100644 --- a/src/plugins.js +++ b/src/plugins.js @@ -1,4 +1,5 @@ const attachments = require('./data/attachments'); +const { beforeNewThread } = require('./hooks'); module.exports = { getPluginAPI({ bot, knex, config, commands }) { @@ -17,6 +18,9 @@ module.exports = { addStorageType: attachments.addStorageType, downloadAttachment: attachments.downloadAttachment }, + hooks: { + beforeNewThread, + }, }; },