UNPKG

nestjs-slack-bolt

Version:

A NestJS module for seamless integration with Slack using the Bolt SDK

25 lines (24 loc) 718 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Event = void 0; const base_decorator_1 = require("./base.decorator"); const constants_1 = require("./constants"); /** * Decorator for methods that listen and react to Slack events. * * @param eventType - The type of Slack event to listen for. Must be a valid SlackEventTypes value. * * @example * class MySlackBot { * @Event('message') * handleMessage(event: SlackEvent) { * // Handle message event * } * * @Event('app_mention') * handleAppMention(event: SlackEvent) { * // Handle app mention event * } * } */ exports.Event = (0, base_decorator_1.MetadataBase)(constants_1.SLACK_EVENT_METADATA);