commit | 701b411e5beebe7bb9197e4f49963a4580f55049 | [log] [tgz] |
---|---|---|
author | Philippe Suter <psuter@us.ibm.com> | Tue Jul 19 07:50:13 2016 -0400 |
committer | Philippe Suter <psuter@us.ibm.com> | Tue Jul 19 07:50:13 2016 -0400 |
tree | 492dd8e686b92e7b9bdbb2d6f90610a592dedf46 | |
parent | 9f17603640ae31e9ac475ce6de82ae4445896206 [diff] |
A word of warning.
This repository contains proof-of-concept-quality code to deploy a Slackbot with the capability to run OpenWhisk actions.
Copy src/main/resources/application.conf.template
to src/main/resources/application.conf
and fill in the credentials as indicated in the comments.
Run slack.whisk.Main
.
You can run either from sbt
directly, or use sbt eclipse
to generate an Eclipse project and create a run configuration from there.
(Assuming your bot is called @whiskbot
.)
Send a run command either as a direct message, or using a mention in a channel where the bot was invited:
@whiskbot: please run this for me: ```function main(args) { return { "greeting": "Hello " + args.name + "!" }; }``` ```{ "name" : "visitor" }```
The message needs to contain the keywords “run”, “please”, and two triple-quoted blocks; one for the JavaScript code, and one for the action payload.