examples/echoes_bot.rb in chatterbot-0.3.0 vs examples/echoes_bot.rb in chatterbot-0.4.0

- old
+ new

@@ -19,10 +19,15 @@ puts "checking for replies to me" replies do |tweet| # replace the incoming username with the handle of the user who tweeted us - src = tweet[:text].gsub(/@echoes_bot/, tweet_user(tweet)) + # src = tweet[:text].gsub(/@echoes_bot/, tweet_user(tweet)) + + # replace the incoming username with #USER#, which will be replaced + # with the handle of the user who tweeted us by the + # replace_variables helper + src = tweet[:text].gsub(/@echoes_bot/, "#USER#") # send it back! reply src, tweet end