Giter VIP home page Giter VIP logo

hubot-react's Introduction

hubot-react

Train hubot to react to certain terms. Multiple responses to the same term are allowed. One will be selected at-random.

Bob: hubot react homestar seriously.
Hubot: reacting to homestar with seriously.
...
Alice: Homestar Runner is the best.
Hubot: seriously.

Matching

It currently uses natural's PorterStemmer to match words regardless of conjugation, tense, etc. This is almost certainly going to change as I experiment with it more.

Configuration

Store size

Remember at most N messages (default 200).

HUBOT_REACT_STORE_SIZE=N

Throttle expiration

Throttle responses to the same terms for N seconds (default 300).

HUBOT_REACT_THROTTLE_EXPIRATION=N

Initialization timeout

Wait for N milliseconds for hubot to initialize and load brain data from redis. (default 10000)

HUBOT_REACT_INIT_TIMEOUT=N

Commands

React (single-word term)

Tell hubot to react with <response> when it hears <term>.

hubot react <term> <response>

React (multi-word term)

Tell hubot to react with <response> when it hears <term>.

hubot react "<term>" <response>

Ignore

Tell hubot to forget the last <term> <response> pair that was uttered.

hubot ignore that

hubot-react's People

Contributors

b3nj4m avatar generalistdev avatar strugee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hubot-react's Issues

Multi-word term

Hi I am not sure if this is a misunderstanding from my part. The multi-word term does not work as expected. This is how I have issued the command

CS: react "test1 test2" with Test_success
Bot: Reacting to "test1 with test2" with Test_success

I was expecting hubot to listen for a sentence with "test1 test2". However this is the result

CS: "test1
Bot: test2" with Test_success

Is this by design?

remove/delete react?

Is there a way to remove/delete a reaction? other than ignoring the last, I have a react I entered a while ago and its improperly react'ing and now I want to remove it. How do I do that?

Thanks in advance.

Support to hubot-slack adapter

Apparently, there is a problem when using it with slack plataform...
See above:

> jbot react saboutage kill them all!
TypeError: Cannot read property 'saboutage' of null
  at addResponse (/app/node_modules/hubot-react/scripts/react.js:136:43)
  at TextListener.callback (/app/node_modules/hubot-react/scripts/react.js:271:23)
  at executeListener (/app/node_modules/hubot/src/listener.coffee:65:11, <js>:53:19)
  at allDone (/app/node_modules/hubot/src/middleware.coffee:41:37, <js>:32:16)
  at /app/node_modules/async/lib/async.js:274:13
  at Object.async.eachSeries (/app/node_modules/async/lib/async.js:142:20)
  at Object.async.reduce (/app/node_modules/async/lib/async.js:268:15)
  at /app/node_modules/hubot/src/middleware.coffee:46:7, <js>:35:22
  at process._tickCallback (node.js:355:11)

Versions:

"hubot": "2.16.0",
"hubot-slack": "3.3.0",
"hubot-react": "4.1.1"

npm install fail

gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.13.0-68-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/zulip/myhubot/node_modules/msgpack
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Linux 3.13.0-68-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "hubot-react"
npm ERR! node v5.0.0
npm ERR! npm v3.4.0
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the msgpack package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls msgpack
npm ERR! There is likely additional logging output above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.