Class: Twitch::Bot::Client::ModeHandler
- Inherits:
-
EventHandler
- Object
- EventHandler
- Twitch::Bot::Client::ModeHandler
- Defined in:
- lib/twitch/bot/default_handlers.rb
Overview
Handle a change in moderators on the channel.
Instance Attribute Summary
Attributes inherited from EventHandler
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from EventHandler
Constructor Details
This class inherits a constructor from Twitch::Bot::EventHandler
Class Method Details
.handled_events ⇒ Object
41 42 43 |
# File 'lib/twitch/bot/default_handlers.rb', line 41 def self.handled_events [:mode] end |
Instance Method Details
#call ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/twitch/bot/default_handlers.rb', line 31 def call user = event.user case event.mode when :add_moderator client.add_moderator(user) when :remove_moderator client.remove_moderator(user) end end |