class Twitchbot::PingPlugin

Plugin to handle any PING messages from the server and keep the connection alive

Public Instance Methods

message(handler) click to toggle source

Listen for any PING messages and respond with PONG

> PING :tmi.twitch.tv
# File lib/twitchbot/plugin/ping_plugin.rb, line 12
def message(handler)
  handler.send_raw('PONG :tmi.twitch.tv') if handler.message.ping?
end