Class: MijDiscord::Events::UpdatePlaying
- Inherits:
-
UpdatePresence
- Object
- EventBase
- Generic
- Server
- UpdatePresence
- MijDiscord::Events::UpdatePlaying
- Defined in:
- lib/mij-discord/events/server.rb
Instance Attribute Summary collapse
-
#game ⇒ Object
readonly
Returns the value of attribute game.
-
#stream_type ⇒ Object
readonly
Returns the value of attribute stream_type.
-
#stream_url ⇒ Object
readonly
Returns the value of attribute stream_url.
Attributes inherited from UpdatePresence
Attributes inherited from Server
Attributes inherited from Generic
Instance Method Summary collapse
-
#initialize(bot, data) ⇒ UpdatePlaying
constructor
A new instance of UpdatePlaying.
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
#game ⇒ Object (readonly)
Returns the value of attribute game.
83 84 85 |
# File 'lib/mij-discord/events/server.rb', line 83 def game @game end |
#stream_type ⇒ Object (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_url ⇒ Object (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 |