Class: MijDiscord::Events::UpdatePlaying

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

Instance Attribute Summary collapse

Attributes inherited from UpdatePresence

#status, #user

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) ⇒ UpdatePlaying

Returns a new instance of UpdatePlaying.



92
93
94
95
96
97
98
99
100
# File 'lib/mij-discord/events/server.rb', line 92

def initialize(bot, data)
  super(bot, data)

  if (game = data['game'])
    @game = game['name']
    @stream_type = game['type']
    @stream_url = game['url']
  end
end

Instance Attribute Details

#gameObject (readonly)

Returns the value of attribute game.



83
84
85
# File 'lib/mij-discord/events/server.rb', line 83

def game
  @game
end

#stream_typeObject (readonly)

Returns the value of attribute stream_type.



85
86
87
# File 'lib/mij-discord/events/server.rb', line 85

def stream_type
  @stream_type
end

#stream_urlObject (readonly)

Returns the value of attribute stream_url.



87
88
89
# File 'lib/mij-discord/events/server.rb', line 87

def stream_url
  @stream_url
end