小编kri*_*ish的帖子

Botkit和Aws Lambda

如何部署在Aws Lambda中使用Botkit构建的slack bot.如果是斜杠命令,我们可以使用下面的代码响应事件.

exports.handler = function(event, context) {
    //Echo back the text the user typed in
    context.succeed('You sent: ' + event.text);
};
Run Code Online (Sandbox Code Playgroud)

但不知道如何为Bots做同样的事情.使用Botkit(Howdy)的Bots的示例代码是

Controller.hears(['help'], 'direct_message,direct_mention,mention', (bot, message) => {
    bot.reply(message, {
        text: `You can ask me things like:
    "Search Contact"
    "Search Account"`
    });
});
Run Code Online (Sandbox Code Playgroud)

aws-lambda botkit

4
推荐指数
1
解决办法
1267
查看次数

标签 统计

aws-lambda ×1

botkit ×1