Sha256: 25ee3650f09e96d513f9d27de990b0909bdb79d48a2d95585cfb91d9b2af528d
Contents?: true
Size: 600 Bytes
Versions: 2
Compression:
Stored size: 600 Bytes
Contents
#!/usr/bin/env ruby # # require the dsl lib to include all the methods you see below. # require 'chatterbot/dsl' puts "Loading echoes_bot.rb" ## ## If I wanted to exclude some terms from triggering this bot, I would list them here. ## For now, we'll block URLs to keep this from being a source of spam ## exclude "http://" blacklist "mean_user, private_user" 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)) # send it back! reply src, tweet end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
chatterbot-0.2.1 | examples/echoes_bot.rb |
chatterbot-0.2.0 | examples/echoes_bot.rb |