commit | 9f52c4944609ba1949eb1953c1774715cb012d25 | [log] [tgz] |
---|---|---|
author | Philippe Suter <psuter@us.ibm.com> | Mon Jul 18 16:50:55 2016 -0400 |
committer | Philippe Suter <psuter@us.ibm.com> | Mon Jul 18 16:50:55 2016 -0400 |
tree | 121ca993c61bc68a2beb17789aa57f2f36c98683 | |
parent | 991b59d35f13cbaea6a0fc9c994cb5369d1e4198 [diff] |
Dockerfile to containerize bot.
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.