Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement