Class: Rubirai::NewFriendRequestEvent

Inherits:
RequestEvent show all
Defined in:
lib/rubirai/event_resp.rb,
lib/rubirai/events/request_events.rb

Instance Attribute Summary

Attributes inherited from RequestEvent

#event_id, #from_id, #group_id, #message, #nick

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 Method Details

#respond(operation, message = '') ⇒ void

This method returns an undefined value.

Respond to the friend request.

Parameters:

  • operation (Integer)
  • message (String) (defaults to: '')

    the message to reply



103
104
105
# File 'lib/rubirai/event_resp.rb', line 103

def respond(operation, message = '')
  @bot.respond_to_new_friend_request @event_id, @from_id, operation, @group_id, message
end