Created
May 26, 2011 01:56
-
-
Save muffinista/992405 to your computer and use it in GitHub Desktop.
A Simple Twitter Bot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment