README.md in slack-smart-bot-0.6.14 vs README.md in slack-smart-bot-0.6.16

- old
+ new

@@ -27,36 +27,15 @@ settings = { nick: 'my_smart_bot', # the smart bot name token: 'xxxxxxxxxxxxxxxxxx' # the API Slack token } -pid = Process.pid - -restarts = 0 -loop { - SlackSmartBot.new(settings).listen - if restarts > 300 - puts "More than 300 restarts. Quitting!" - break - end - - if ARGV.size == 0 #on master channel - #kill the running sub bots - children = `pgrep -P #{pid}`.split("\n") - children.each do |pc| - `kill #{pc}` - end - sleep 1 - children = `pgrep -P #{pid}`.split("\n") - children.each do |pc| - puts "Pay attention!!! Process pid: #{pc} still Running" - end - end - - restarts+=1 - puts "Restarting: #{restarts}" - sleep 20 -} +begin + puts "Connecting #{settings.inspect}" + SlackSmartBot.new(settings).listen +rescue Exception => e + puts "Rescued: #{e.inspect}" +end ``` The MASTER_CHANNEL will be the channel where you will be able to create other bots and will have special treatment.