0.01
No commit activity in last 3 years
No release in over 3 years
A Lita handler for responding using saved key-value or optionally using cleverbot
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 3.0.0

Runtime

 Project Readme

lita-responder

Build Status Code Climate Coverage Status

lita-responder is a handler for Lita that responds to most command messages using stored key-value and optionally cleverbot

Installation

Add lita-responder to your Lita instance's Gemfile at the end after all other handlers:

gem "lita-responder"

Configuration

  • cleverbot - set true to enable cleverbot responds to undefined messages, otherwise lita-responder will ignore them
Lita.configure do |config|
  config.handlers.responder.cleverbot = true
end

Usage

Add key-value (group: admin, responder_admins)

lita, responder add REGEXP_KEY -> VALUE

example:

lita, responder add (web)?site.*boci(\s*studio)?(\s+.*)?\?$ -> http://www.bocistudio.com

will return http://www.bocistudio.com to any commands not used by other handlers which match the regexp (eg: lita, site boci?)

Delete key-value (group: admin, responder_admins)

lita, responder delete REGEXP_KEY

List key-value (group: admin, responder_admins)

lita, responder list

Remove all key-value (group: admin)

lita, responder reset

TODO

  • allow multiple values for single key, value selected randomly
  • allow room specific key-value
  • I18n

License

MIT