Sha256: 444238b6e3ade866d81491437134771a37c4167a73f9923adfdd4da0e1553164
Contents?: true
Size: 671 Bytes
Versions: 1
Compression:
Stored size: 671 Bytes
Contents
module Chatterbot # # routines for sending tweets module Tweet # simple wrapper for sending a message def tweet(txt, params = {}, original = nil) return if require_login == false txt = replace_variables(txt, original) if debug_mode? debug "I'm in debug mode, otherwise I would tweet: #{txt}" else debug txt client.update txt, params end rescue Twitter::Error::Forbidden => e #:nocov: debug e false #:nocov: end # reply to a tweet def reply(txt, source) debug txt tweet txt, {:in_reply_to_status_id => source[:id]}, source end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chatterbot-2.0.0.pre | lib/chatterbot/tweet.rb |