hubot-rocketchat-ignore-direct
Middleware to prevent hubot listeners from responding to direct messages.
Last updated 4 years ago by timkinnane .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hubot-rocketchat-ignore-direct 
SYNC missed versions from official npm registry.

hubot-rocketchat-ignore-direct

NPM version

Middleware to respond to DM's with canned text, preventing further listeners from responding to direct messages (for bots that should only respond in channels).

This is different to the default option of setting RESPOND_TO_DM=false because it allows the bot to respond, improving the experience by not stone-walling users.

e.g. Allow specific groups of users access to a bot's commands, add it to a channel only they can access. It will ignore everyone else but can still message them one-way and provide static information on how to interact in channels.

See src/rocketchat-ignore-direct.coffee for full documentation.

Installation

In hubot project repo, run:

npm install hubot-rocketchat-ignore-direct --save

Then add hubot-rocketchat-ignore-direct to your external-scripts.json:

["hubot-rocketchat-ignore-direct"]

Sample Interaction

This is just middleware, it intercepts listeners but doesn't have any interaction other than an (optional) reply that it's ignoring direct messages.

In direct message

user1>> hubot do something, anything!?
hubot>> Sorry, I'm not listening.

In group channel

user1>> hubot do something, anything!?
hubot>> <whatever normal response>

Current Tags

  • 0.0.3                                ...           latest (4 years ago)

3 Versions

  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (1)
Dev Dependencies (17)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |