Method: Chatterbot::DSL#exclude

Defined in:
lib/chatterbot/dsl.rb

#exclude(*args) ⇒ Object

specify list of strings we will check when deciding to respond to a tweet or not. accepts an array or a comma-delimited string. when called, any subsequent calls to search or replies will filter out tweets with these strings

Examples:

exclude "spam, junk, something"

Parameters:

  • args (Array, String)

    list of usernames



374
375
376
377
378
379
380
381
# File 'lib/chatterbot/dsl.rb', line 374

def exclude(*args)
  e = flatten_list_of_strings(args)
  if e.nil? || e.empty?
    bot.exclude = []
  else
    bot.exclude += e
  end
end