Module: TwitchPlays
- Defined in:
- lib/twitch_plays/os.rb,
lib/twitch_plays/os/win.rb,
lib/twitch_plays/os/x11.rb,
lib/twitch_plays/version.rb,
lib/twitch_plays/twitch_plays.rb
Defined Under Namespace
Modules: OS
Classes: Plugin
Constant Summary
collapse
- VERSION =
'1.1.0'
Class Method Summary
collapse
Class Method Details
.start(config_file:) ⇒ Object
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
# File 'lib/twitch_plays/twitch_plays.rb', line 175
def self.start(config_file:)
bot = Cinch::Bot.new do
configure do |c|
config = YAML.load_file(config_file)
c.server = config[:server]
c.port = config[:port]
c.nick = config[:nick]
c.password = config[:password]
c.channels = [config[:channel]]
c.plugins.plugins = [Plugin]
c.plugins.options[Plugin] = config
end
end
trap('INT') do
bot.quit
end
bot.start
end
|