Class: Cinch::Plugins::TwitchTV
- Inherits:
-
Object
- Object
- Cinch::Plugins::TwitchTV
- Includes:
- Cinch::Plugin
- Defined in:
- lib/cinch/plugins/twitch.rb,
lib/cinch/plugins/twitch/version.rb
Overview
Versioning info
Constant Summary collapse
- VERSION =
'0.0.3'
Instance Method Summary collapse
- #execute(m) ⇒ Object
-
#initialize(*args) ⇒ TwitchTV
constructor
A new instance of TwitchTV.
- #live_check ⇒ Object
Constructor Details
#initialize(*args) ⇒ TwitchTV
Returns a new instance of TwitchTV.
14 15 16 17 18 |
# File 'lib/cinch/plugins/twitch.rb', line 14 def initialize(*args) super @streamid = config[:streamid] @currently_live = live? end |
Instance Method Details
#execute(m) ⇒ Object
20 21 22 |
# File 'lib/cinch/plugins/twitch.rb', line 20 def execute(m) m.reply , true end |
#live_check ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/cinch/plugins/twitch.rb', line 24 def live_check if @currently_live == live? debug "Stream is currently [#{live? ? 'Online' : 'Offline'}]" return end debug "Stream status changed to [#{live? ? 'Online' : 'Offline'}]" @bot.channels.first.msg() if live? @currently_live = live? end |