UNPKG

@ebonydevcopy/framework

Version:

A module-based NodeJS chatbot framework.

26 lines 912 B
"use strict"; /** * ebony-framework * * @module handlers/attachment * @author Christos Panagiotakopoulos <chrispanag@gmail.com> * @copyright Copyright(c) 2020 Christos Panagiotakopoulos * @license MIT * */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const AttachmentRouter_1 = __importDefault(require("../routers/AttachmentRouter")); function attachmentHandler(typeMatcher = new AttachmentRouter_1.default()) { return (user, attachment) => { const action = typeMatcher.getRoute(attachment.type); if (action) { return action(user); } console.log('No Attachment Handler for Attachment of type: ' + attachment.type); }; } exports.default = attachmentHandler; //# sourceMappingURL=attachment.js.map