Class: Twitchbot::PingPlugin
- Inherits:
-
Object
- Object
- Twitchbot::PingPlugin
- Includes:
- Plugin
- Defined in:
- lib/twitchbot/plugin/ping_plugin.rb
Overview
Plugin to handle any PING messages from the server and keep the connection alive
Constant Summary
Constants included from Plugin
Instance Method Summary collapse
-
#message(handler) ⇒ Object
Listen for any PING messages and respond with PONG.
Methods included from Plugin
#close, #error, included, #open
Instance Method Details
#message(handler) ⇒ Object
Listen for any PING messages and respond with PONG
> PING :tmi.twitch.tv
12 13 14 |
# File 'lib/twitchbot/plugin/ping_plugin.rb', line 12 def (handler) handler.send_raw('PONG :tmi.twitch.tv') if handler..ping? end |