Class: Ruboty::Handlers::Kokodeikku
- Inherits:
-
Base
- Object
- Base
- Ruboty::Handlers::Kokodeikku
- Defined in:
- lib/ruboty/handlers/kokodeikku.rb
Constant Summary collapse
- PREFIX =
"ここで一句 "
Instance Method Summary collapse
Instance Method Details
#kokodeikku(message) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/ruboty/handlers/kokodeikku.rb', line 20 def kokodeikku() return if channels && !channels.include?(.to) if .from != robot.name && !.body.start_with?(PREFIX) && (song = reviewer.find(.body)) .reply("#{PREFIX}#{song.phrases.map(&:join).join(' ')}") end end |