Add on_retweet to skeleton/README
This commit is contained in:
parent
20dff3a148
commit
7f74849d0f
2 changed files with 15 additions and 0 deletions
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue