Created
January 22, 2016 16:44
-
-
Save Tosainu/193e0cb521ab955aa19b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'slack-ruby-client' | |
Slack.configure do |conf| | |
conf.token = 'TOKEN' | |
end | |
client = Slack::RealTime::Client.new | |
client.on :hello do | |
puts 'connected!' | |
end | |
client.on :message do |data| | |
case data['text'] | |
when 'にゃーん' then | |
client.message channel: data['channel'], text:'Λ__Λ' | |
end | |
end | |
client.start! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'slack-ruby-client' | |
gem 'eventmachine' | |
gem 'faye-websocket' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment