LoginSignup
1
3

More than 5 years have passed since last update.

slack bot を作ってみた参考類

Last updated at Posted at 2017-04-24

slack bot 作成ベースの参考記事

Hubot を使う

よく使うコマンド

// 起動
./bin/hubot --adapter slack

定時時間に発言させる

cron 機能

IBM Bluemix

https://bita.jp/dml/slack_botkit
http://qiita.com/Amebayashi/items/ca979ec6f925abc7713f

AWS Lamdba

hiroku

http://qiita.com/acairojuni/items/dc4543aa5827d4c3211c
- 使い方
http://qiita.com/Arashi/items/b2f2e01259238235e187
プロセス
http://qiita.com/zucay/items/3b52b0fbc8b6c963c7e0

web: npm install
web: bin/hubot -a campfire
web: bin/hubot --adapter slack

モジュールがないって言われたので、npm installを追加

// あとurlの設定
$ heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=[your bot app url]
//URL は、以下のコマンドの結果の web_url に書かれているものを指定
$ heroku apps:info

起動時間の設定

$ heroku config:set HUBOT_HEROKU_WAKEUP_TIME=8:00
$ heroku config:set HUBOT_HEROKU_SLEEP_TIME=24:00
$ heroku config:set TZ='Asia/Tokyo'
$ heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=$(heroku apps:info -s | grep web-url | cut -d= -f2)

http://qiita.com/him0net/items/9e80dd53e1a9a4c33dd7
http://blog.spacemarket.com/code/hubot-on-heroku-free-dyno/

参考にしたいネタとか動かし方とか

追加してみた

npm install hubot-slack-stamp

使うコマンド

// ローカルで起動
./bin/hubot --adapter slack
// ps 一時停止、再開
$ heroku ps:scale web=0
$ heroku ps:scale web=1
1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3