Sha256: b6da1f0250669fb174760900db38534666215fc19b86abffaa6024b95445c6d4

Contents?: true

Size: 619 Bytes

Versions: 9

Compression:

Stored size: 619 Bytes

Contents

#!/usr/bin/env ruby


#
# require the dsl lib to include all the methods you see below.
#
require 'rubygems'
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

9 entries across 9 versions & 1 rubygems

Version Path
chatterbot-0.3.0 examples/echoes_bot.rb
chatterbot-0.2.9 examples/echoes_bot.rb
chatterbot-0.2.8 examples/echoes_bot.rb
chatterbot-0.2.7 examples/echoes_bot.rb
chatterbot-0.2.6 examples/echoes_bot.rb
chatterbot-0.2.5 examples/echoes_bot.rb
chatterbot-0.2.4 examples/echoes_bot.rb
chatterbot-0.2.3 examples/echoes_bot.rb
chatterbot-0.2.2 examples/echoes_bot.rb