class Twitch::Bot::EventHandler
Handles a message of a specific type
Attributes
client[R]
event[R]
Public Class Methods
handled_events()
click to toggle source
Return a list of event types this handler subscribes to
@return [Array] list of event types
# File lib/twitch/bot/event_handler.rb, line 14 def self.handled_events [] end
new(event:, client:)
click to toggle source
Inititalize an event handler object
@parameter event The latest event of a subscribed type @parameter client The current chat client object
# File lib/twitch/bot/event_handler.rb, line 24 def initialize(event:, client:) @event = event @client = client end
Public Instance Methods
call()
click to toggle source
Handle the event
@return void
# File lib/twitch/bot/event_handler.rb, line 34 def call raise "Unhandled #{event.type}" end