Class: Twitch::Bot::NoticeCommandParser

Inherits:
CommandParser show all
Defined in:
lib/twitch/bot/message_parser.rb

Overview

Parses a NOTICE IRC command.

Instance Attribute Summary

Attributes inherited from CommandParser

#message

Instance Method Summary collapse

Methods inherited from CommandParser

#initialize

Constructor Details

This class inherits a constructor from Twitch::Bot::CommandParser

Instance Method Details

#callObject



157
158
159
160
161
162
163
# File 'lib/twitch/bot/message_parser.rb', line 157

def call
  if message.params.last.match?(/Login authentication failed/)
    Message::LoginFailed.new(user: message.user)
  else
    Message::NotSupported.new(message)
  end
end