0.0.5 • Published 8 years ago

hubot-cc v0.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

hubot-cc

Build Status devDependency Status

This script relies on a new Hubot v2.16.0 feature known as 'receive middleware'. It WILL NOT work on older versions of Hubot.

A Hubot script for defining aliases to easily @mention groups of people in a room or a global context.

See src/cc.coffee for full documentation.

Installation via NPM

  1. Install the hubot-cc module as a Hubot dependency by running:

    npm install --save hubot-cc
  2. Enable the module by adding the hubot-cc entry to your external-scripts.json file:

    [
        "hubot-cc"
    ]
  3. Run your bot and see below for available config / commands

Commands

CommandListener IDDescription
hubot cc new-channel alias users...cc.new.channelCreates a new @alias to @mention all users... (space separated) in the context of the current room / channel
hubot cc new-global alias users...cc.new.globalCreates a new @alias to @mention all users... (space separated) in any context
cc remove aliascc.removeRemoves @alias from the current, and the global context
cc listcc.listReturns all defined aliases

Contexts

The difference between new-channel, and new-global is that aliases created using the former (new-channel) can only be triggered in the room / channel (context) that it was created in. Aliases created using the latter (new-global) however, can be triggered in any context as long as the bot is present in it.

If there is an alias defined with the same name in a local (room / channel), and a global context, both of them may be triggered at the same time.

Sample Interaction

user1>> hubot cc new-global admins user1 user2 user3
hubot>> user1: The @admins alias has now been added / updated. Try it out!
user1>> Hello @admins!
hubot>> cc: @user1 @user2 @user3
0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago