UNPKG

bottender

Version:

A framework for building conversational user interfaces.

25 lines 966 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const router_1 = require("../router"); const slack = (action) => { return router_1.route((context) => context.platform === 'slack', action); }; slack.any = slack; function message(action) { return router_1.route((context) => context.platform === 'slack' && context.event.isMessage, action); } slack.message = message; function event(eventType, action) { return router_1.route((context) => context.platform === 'slack' && context.event.rawEvent.type && (eventType === '*' || context.event.rawEvent.type === eventType), action); } slack.event = event; function command(commandText, action) { return router_1.route((context) => context.platform === 'slack' && context.event.command && (commandText === '*' || context.event.command === commandText), action); } slack.command = command; exports.default = slack; //# sourceMappingURL=routes.js.map