Class: MijDiscord::Events::UpdatePresence

Inherits:
Server show all
Defined in:
lib/mij-discord/events/server.rb

Direct Known Subclasses

UpdatePlaying

Instance Attribute Summary collapse

Attributes inherited from Server

#server

Attributes inherited from Generic

#bot

Instance Method Summary collapse

Methods inherited from EventBase

delegate_method, filter_match, inherited, #trigger?

Constructor Details

#initialize(bot, data) ⇒ UpdatePresence

Returns a new instance of UpdatePresence.



73
74
75
76
77
78
79
# File 'lib/mij-discord/events/server.rb', line 73

def initialize(bot, data)
  server = @bot.server(data['guild_id'])
  super(bot, server)

  @status = data['status'].to_sym
  @user = @bot.user(data['user']['id'])
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



68
69
70
# File 'lib/mij-discord/events/server.rb', line 68

def status
  @status
end

#userObject (readonly)

Returns the value of attribute user.



66
67
68
# File 'lib/mij-discord/events/server.rb', line 66

def user
  @user
end