LoginSignup
3
0

More than 5 years have passed since last update.

かねがね実用性のあるSlack botをRuby(とHeroku)で作ってみよう!

Last updated at Posted at 2016-12-22

SlackのbotをRubyで作ろう!講座です。とってもカンタン。

【環境】
・Ruby 2.3.1

まずは下準備♫

①お好きなディレクトリで下記コマンドを順に入力

ターミナル
$ mkdir test_bot
$ cd test_bot
$ touch app.rb
$ bundle init

②Gem fileに下記2行を追加

Gemfile
ruby "2.3.1"
gem 'slack-api'

③gemのインストール

ターミナル
$ bundle install

④SlackのTOKENをこちらから作成(Generate test tokensボタンを押すだけ)。

スクリーンショット 2016-12-22 16.36.32.png

⑤押したら別ページに自動で飛び、あなたが所属しているSlackチームのトークンを確認しましょう。スクリーンショット_2016-12-22_16_40_31.png

⑥botを実装したいチャンネルをこちらから確認する(unnamed.png

それでは実装に入りましょう♫

3
0
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
3
0