Class: Discordrb::Events::ServerMemberDeleteEvent

Inherits:
ServerMemberEvent show all
Defined in:
lib/discordrb/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 Discordrb::Events::ServerMemberEvent

Instance Attribute Details

#userUser (readonly)

Returns the user in question.

Returns:

  • (User)

    the user in question.



88
89
90
# File 'lib/discordrb/events/members.rb', line 88

def user
  @user
end

Instance Method Details

#init_user(data, bot) ⇒ Object

Override init_user to account for the deleted user on the server



83
84
85
# File 'lib/discordrb/events/members.rb', line 83

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