From 7f74849d0f941ca2785462c1bf144624a80982aa Mon Sep 17 00:00:00 2001 From: Jaiden Mispy Date: Wed, 13 Jan 2016 02:27:24 -0800 Subject: [PATCH] Add on_retweet to skeleton/README --- README.md | 10 ++++++++++ skeleton/bots.rb | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index e8e1f88..c6f4934 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,16 @@ class MyBot < Ebooks::Bot # Reply to a tweet in the bot's timeline # reply(tweet, meta(tweet).reply_prefix + "nice tweet") end + + def on_favorite(user, tweet) + # Follow user who just favorited bot's tweet + # follow(user.screen_name) + end + + def on_retweet(tweet) + # Follow user who just retweeted bot's tweet + # follow(tweet.user.screen_name) + end end # Make a MyBot and attach it to an account diff --git a/skeleton/bots.rb b/skeleton/bots.rb index 1d1f313..12cdfa7 100644 --- a/skeleton/bots.rb +++ b/skeleton/bots.rb @@ -51,6 +51,11 @@ class MyBot < Ebooks::Bot # Follow user who just favorited bot's tweet # follow(user.screen_name) end + + def on_retweet(tweet) + # Follow user who just retweeted bot's tweet + # follow(tweet.user.screen_name) + end end # Make a MyBot and attach it to an account