Class: Twitch::Bot::Client::PingHandler
- Inherits:
-
EventHandler
- Object
- EventHandler
- Twitch::Bot::Client::PingHandler
- Defined in:
- lib/twitch/bot/default_handlers.rb
Overview
Respond to a :ping event with a pong so we don’t get disconnected.
Instance Attribute Summary
Attributes inherited from EventHandler
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from EventHandler
Constructor Details
This class inherits a constructor from Twitch::Bot::EventHandler
Class Method Details
.handled_events ⇒ Object
13 14 15 |
# File 'lib/twitch/bot/default_handlers.rb', line 13 def self.handled_events [:ping] end |
Instance Method Details
#call ⇒ Object
9 10 11 |
# File 'lib/twitch/bot/default_handlers.rb', line 9 def call client.send_data "PONG :#{event.hostname}" end |