Skip to content

Instantly share code, notes, and snippets.

@alexbaldwin
Created June 8, 2017 22:58
Show Gist options
  • Save alexbaldwin/d627246287b0792aef5fc7b353e3d704 to your computer and use it in GitHub Desktop.
Save alexbaldwin/d627246287b0792aef5fc7b353e3d704 to your computer and use it in GitHub Desktop.
Twitter follow and response
#!/usr/bin/env ruby
# https://github.com/muffinista/chatterbot#what-can-i-do
require 'rubygems'
require 'chatterbot/dsl'
# consumer_key 'consumer_key'
# consumer_secret 'consumer_secret'
# secret 'secret'
# token 'token'
# Keep enabled for testing, not posting
# debug_mode
# remove this to get less output when running your bot
verbose
# This will restrict your bot to tweets that come from accounts that
# are following your bot. A tweet from an account that isn't following
# will be rejected
only_interact_with_followers
use_streaming
followed do |user|
# puts user.username
tweet "@#{user.screen_name} Thanks for following! 🙌 BTW, you can get my future blog posts by clicking \"Subscribe\" below👇:"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment