Sha256: 47fe2ba3c025e61b493e751ad7e2fca613de494c50db1a98506d3edfeb47d1ed
Contents?: true
Size: 623 Bytes
Versions: 2
Compression:
Stored size: 623 Bytes
Contents
module Chatterbot # routines for retweet module Retweet # simple wrapper for retweeting a message # @param [id] id A tweet or the ID of a tweet. if not specified, # tries to use the current tweet if available def retweet(id=@current_tweet) return if require_login == false || id.nil? id = id_from_tweet(id) #:nocov: if debug_mode? debug "I'm in debug mode, otherwise I would retweet with tweet id: #{id}" return end #:nocov: begin client.retweet id rescue StandardError => e puts e.inspect end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
chatterbot-1.0.2 | lib/chatterbot/retweet.rb |
chatterbot-1.0.1 | lib/chatterbot/retweet.rb |