Class: Ruboty::DMM::Actions::Messenger

Inherits:
Actions::Base
  • Object
show all
Defined in:
lib/ruboty/dmm/actions/messenger.rb

Instance Method Summary collapse

Instance Method Details

#callObject



5
6
7
8
9
10
11
# File 'lib/ruboty/dmm/actions/messenger.rb', line 5

def call
  attachments = Ruboty::DMM::Ranking.new(message.match_data).arts
  term = term_converter(message.match_data[:term])
  message.reply("#{term}のランキングです。", attachments: attachments) # temporary ignoring tags. I have to add interface for tags
rescue => exception
  message.reply("Failed by #{exception.class}")
end