Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
require 'zircon'
require 'colorize'
client = Zircon.new(
server: 'irc.twitch.tv',
port: '6667',
channel: '#admiralbulldog',
username: 'username',
password: 'oauth:your_token'
)
removed_colors = [:black, :white, :light_black, :light_white]
colors = String.colors - removed_colors
f = File.open('chat.txt', 'w')
client.on_message do |message|
puts ">>> #{message.from}: #{message.body}".colorize(colors.sample)
f.write(message.body.to_s + "\n")
end
client.run!
f.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment