Module: Chatterbot::Favorite

Included in:
Bot
Defined in:
lib/chatterbot/favorite.rb

Overview

routines for favorites

Instance Method Summary collapse

Instance Method Details

#favorite(id = @current_tweet) ⇒ Object

simple wrapper for favoriting a message tries to use the current tweet if available

Parameters:

  • id (id) (defaults to: @current_tweet)

    A tweet or the ID of a tweet. if not specified,


9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/chatterbot/favorite.rb', line 9

def favorite(id=@current_tweet)
  return if  == false

  id = id_from_tweet(id)
  
  #:nocov:
  if debug_mode?
    debug "I'm in debug mode, otherwise I would favorite tweet id: #{id}"
    return
  end
  #:nocov:
  client.favorite id
end