Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Twittbot::BotPart.new :random_reply do
- # When someone mentions the bot...
- on :mention do |tweet|
- # ... reply to the tweet with a random entry of the :replies list that you
- # configured and also include every person that was mentioned in the tweet.
- tweet.reply @config[:replies].sample, reply_all: true
- end
- ## Uncomment the next few lines if you want to add new tweets to the tweet
- ## list on the fly using direct messages.
- ##
- ## Example usage:
- ## !addr Tweet text
- cmd :addr do |args|
- # # adds args (usually the tweet text) to the list of random tweets unless
- # # args already is in the list
- @config[:replys] << args unless @config[:tweets].include? args
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement