Class: Ruboty::Handlers::LastWords
- Inherits:
-
Base
- Object
- Base
- Ruboty::Handlers::LastWords
- Defined in:
- lib/ruboty/handlers/last_words.rb
Instance Method Summary collapse
Instance Method Details
#catchall(message) ⇒ Object
7 8 9 |
# File 'lib/ruboty/handlers/last_words.rb', line 7 def catchall() words[.from_name] = { body: [:keyword], time: Time.new } end |
#last_words(message) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ruboty/handlers/last_words.rb', line 11 def last_words() if last_words = words[[:username]] header = "#{[:username]} said..." body = "#{last_words[:body]}\n[#{last_words[:time]}]" .reply(header) .reply(body, code: true) else .reply("#{[:username]} was forgotten...") end end |