Class: Rubirai::RequestEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/rubirai/event_resp.rb,
lib/rubirai/events/request_events.rb

Instance Attribute Summary collapse

Attributes inherited from Event

#bot, #raw

Instance Method Summary collapse

Methods inherited from Event

#initialize, parse, set_event, type_to_klass, valid_type?

Constructor Details

This class inherits a constructor from Rubirai::Event

Instance Attribute Details

#event_idInteger (readonly)

Returns the event id.

Returns:

  • (Integer)

    the event id



17
# File 'lib/rubirai/events/request_events.rb', line 17

set_event nil, :event_id, :from_id, :group_id, :nick, :message

#from_idInteger (readonly)

Returns the id of the sender of the request.

Returns:

  • (Integer)

    the id of the sender of the request



17
# File 'lib/rubirai/events/request_events.rb', line 17

set_event nil, :event_id, :from_id, :group_id, :nick, :message

#group_idInteger (readonly)

Returns the group where the request is from. 0 if not from group.

Returns:

  • (Integer)

    the group where the request is from. 0 if not from group



17
# File 'lib/rubirai/events/request_events.rb', line 17

set_event nil, :event_id, :from_id, :group_id, :nick, :message

#messageString (readonly)

Returns the message from the sender.

Returns:

  • (String)

    the message from the sender



17
# File 'lib/rubirai/events/request_events.rb', line 17

set_event nil, :event_id, :from_id, :group_id, :nick, :message

#nickString (readonly)

Returns the nickname of the sender of the request.

Returns:

  • (String)

    the nickname of the sender of the request



17
# File 'lib/rubirai/events/request_events.rb', line 17

set_event nil, :event_id, :from_id, :group_id, :nick, :message

Instance Method Details

#respond(operation, message) ⇒ Object

This method is abstract.

Raises:

  • (NotImplementedError)


92
93
94
# File 'lib/rubirai/event_resp.rb', line 92

def respond(operation, message)
  raise NotImplementedError
end