Class: Rubycord::Events::ServerMemberDeleteEvent

Inherits:
ServerMemberEvent show all
Defined in:
lib/rubycord/events/members.rb

Overview

Member leaves

Instance Attribute Summary collapse

Attributes inherited from ServerMemberEvent

#roles, #server

Attributes inherited from Event

#bot

Instance Method Summary collapse

Methods inherited from ServerMemberEvent

#initialize

Constructor Details

This class inherits a constructor from Rubycord::Events::ServerMemberEvent

Instance Attribute Details

#userUser (readonly)

Returns the user in question.

Returns:

  • (User)

    the user in question.



86
87
88
# File 'lib/rubycord/events/members.rb', line 86

def user
  @user
end

Instance Method Details

#init_user(data, bot) ⇒ Object

Override init_user to account for the deleted user on the server



81
82
83
# File 'lib/rubycord/events/members.rb', line 81

def init_user(data, bot)
  @user = Rubycord::User.new(data["user"], bot)
end