class Twitchbot::DebugPlugin
Plugin
to handle displaying debug information such as raw messages received as well as connection events e.g. open, close, error
Public Instance Methods
close(handler)
click to toggle source
Display to the user that the connection has been closed
# File lib/twitchbot/plugin/debug_plugin.rb, line 30 def close(handler) puts '! Connection closed' if handler.bot.debug end
error(handler)
click to toggle source
Display to the user that the connection has encountered an error
# File lib/twitchbot/plugin/debug_plugin.rb, line 25 def error(handler) puts '! Error occurred' if handler.bot.debug end
message(handler)
click to toggle source
Display to the user any raw messages that have been received from the server
# File lib/twitchbot/plugin/debug_plugin.rb, line 16 def message(handler) if handler.bot.debug handler.messages.each do |line| puts "> #{line.raw}" end end end
open(handler)
click to toggle source
Display to the user that the connection has been opened
# File lib/twitchbot/plugin/debug_plugin.rb, line 10 def open(handler) puts '! Connection established' if handler.bot.debug end