class Twitch::Bot::Client::ModeHandler

Handle a change in moderators on the channel.

Public Class Methods

handled_events() click to toggle source
# File lib/twitch/bot/default_handlers.rb, line 41
def self.handled_events
  [:mode]
end

Public Instance Methods

call() click to toggle source
# 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