Class: Rubirai::ForwardMessage::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/rubirai/messages/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash, bot = nil) ⇒ Node

Returns a new instance of Node.



271
272
273
274
275
276
# File 'lib/rubirai/messages/message.rb', line 271

def initialize(hash, bot = nil)
  @sender_id = hash['senderId']
  @time = hash['time']
  @sender_name = hash['senderName']
  @message_chain = MessageChain.make(*hash['messageChain'], sender_id: hash['senderId'], bot: bot)
end

Instance Attribute Details

#message_chainObject (readonly)

Returns the value of attribute message_chain.



269
270
271
# File 'lib/rubirai/messages/message.rb', line 269

def message_chain
  @message_chain
end

#sender_idObject (readonly)

Returns the value of attribute sender_id.



269
270
271
# File 'lib/rubirai/messages/message.rb', line 269

def sender_id
  @sender_id
end

#sender_nameObject (readonly)

Returns the value of attribute sender_name.



269
270
271
# File 'lib/rubirai/messages/message.rb', line 269

def sender_name
  @sender_name
end

#timeObject (readonly)

Returns the value of attribute time.



269
270
271
# File 'lib/rubirai/messages/message.rb', line 269

def time
  @time
end