examples/streaming_bot.rb in chatterbot-2.0.3 vs examples/streaming_bot.rb in chatterbot-2.0.4

- old
+ new

@@ -19,21 +19,12 @@ exclude "http://", "https://" blocklist "mean_user, private_user" -streaming true +use_streaming -favorited do |user, tweet| - reply "@#{user.screen_name} thanks for the fave!", tweet -end - -followed do |user| - tweet "@#{user.screen_name} just followed me!" - follow user -end - replies do |tweet| favorite tweet puts "It's a tweet!" src = tweet.text.gsub(/@echoes_bot/, "#USER#") @@ -43,6 +34,16 @@ direct_messages do |tweet| puts "well, here i am #{tweet.text}" puts tweet.inspect direct_message "got it", tweet.sender end + +favorited do |user, tweet| + reply "@#{user.screen_name} thanks for the fave!", tweet +end + +followed do |user| + tweet "@#{user.screen_name} just followed me!" + follow user +end +