mirror of
https://github.com/thewesker/twitter_ebooks.git
synced 2025-12-20 04:11:08 -05:00
Add on_retweet to skeleton/README
This commit is contained in:
10
README.md
10
README.md
@@ -78,6 +78,16 @@ class MyBot < Ebooks::Bot
|
|||||||
# Reply to a tweet in the bot's timeline
|
# Reply to a tweet in the bot's timeline
|
||||||
# reply(tweet, meta(tweet).reply_prefix + "nice tweet")
|
# reply(tweet, meta(tweet).reply_prefix + "nice tweet")
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
# Make a MyBot and attach it to an account
|
# Make a MyBot and attach it to an account
|
||||||
|
|||||||
@@ -51,6 +51,11 @@ class MyBot < Ebooks::Bot
|
|||||||
# Follow user who just favorited bot's tweet
|
# Follow user who just favorited bot's tweet
|
||||||
# follow(user.screen_name)
|
# follow(user.screen_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def on_retweet(tweet)
|
||||||
|
# Follow user who just retweeted bot's tweet
|
||||||
|
# follow(tweet.user.screen_name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Make a MyBot and attach it to an account
|
# Make a MyBot and attach it to an account
|
||||||
|
|||||||
Reference in New Issue
Block a user