Class: Hipbot::Callbacks::PrivateMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/hipbot/callbacks/private_message.rb

Instance Method Summary collapse

Constructor Details

#initialize(user_id, message_body) ⇒ PrivateMessage

Returns a new instance of PrivateMessage.



4
5
6
7
8
9
# File 'lib/hipbot/callbacks/private_message.rb', line 4

def initialize user_id, message_body
  with_user(id: user_id) do |user|
    return if ignore_message?(user, message_body)
    Hipbot.react(user, nil, message_body)
  end
end