How to deploy an slack bot which is built using Botkit in Aws Lambda. If it is a slash command we can respond to event by using below code.
exports.handler = function(event, context) {
//Echo back the text the user typed in
context.succeed('You sent: ' + event.text);
};
But not sure how to do the same for Bots. example code for Bots using Botkit(Howdy) is
Controller.hears(['help'], 'direct_message,direct_mention,mention', (bot, message) => {
bot.reply(message, {
text: `You can ask me things like:
"Search Contact"
"Search Account"`
});
});