Class: Twitch::Bot::Message::SlowMode

Inherits:
Base
  • Object
show all
Defined in:
lib/twitch/bot/message.rb

Overview

This class stores the details of a SlowMode event.

Instance Attribute Summary collapse

Attributes inherited from Event

#type

Instance Method Summary collapse

Constructor Details

#initialize(status:, channel:) ⇒ SlowMode

Returns a new instance of SlowMode.



82
83
84
85
86
# File 'lib/twitch/bot/message.rb', line 82

def initialize(status:, channel:)
  @status = status
  @channel = channel
  super(type: :slow_mode)
end

Instance Attribute Details

#channelObject (readonly)

Returns the value of attribute channel.



80
81
82
# File 'lib/twitch/bot/message.rb', line 80

def channel
  @channel
end

#statusObject (readonly)

Returns the value of attribute status.



80
81
82
# File 'lib/twitch/bot/message.rb', line 80

def status
  @status
end

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


88
89
90
# File 'lib/twitch/bot/message.rb', line 88

def enabled?
  status.to_i.positive?
end