Class: Ruboty::Handlers::Kokodeikku
- Inherits:
-
Base
- Object
- Base
- Ruboty::Handlers::Kokodeikku
- Defined in:
- lib/ruboty/handlers/kokodeikku.rb
Constant Summary collapse
- DEFAULT_PREFIX =
"ここで一句"
Instance Method Summary collapse
Instance Method Details
#kokodeikku(message) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/ruboty/handlers/kokodeikku.rb', line 21 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 |