Add hooks to plugin API

cshd
Dragory 2020-07-14 00:14:31 +03:00
parent 3c0352ff09
commit 815825de94
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
1 changed files with 4 additions and 0 deletions

View File

@ -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,
},
};
},