1.1.0 • Published 7 years ago

hipchat-botty v1.1.0

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

hipchat-bot

A pluggable client-side hipchat bot.

Install

npm install hipchat-botty

Usage

If you run into errors you may need to install

  • libexpat1-dev: apt-get install libexpat1-dev
  • libicu-dev: apt-get install libicu-dev
var Bot = require('hipchat-botty');

// Use environment vars called HB_* for your configs.
var opts = {
  jid: process.env.HB_JID,
  password: process.env.HB_PASSWORD,
  host: process.env.HB_HOST,
  mucHost: process.env.HB_MUCHOST,
}

// Creates a bot with default handlers.
var b = new Bot(opts)

// Loads some plugins from the src.
// Create your own or contribute!
var pathto = './node_modules/hipchat-botty/examples/plugins/'
b.loadPlugin('chucky', require(pathto + 'chuckjokes'))
b.loadPlugin('commands', require(pathto + 'loaded_plugins'))
b.loadPlugin('help', require(pathto + 'help'))

// Create your own listeners:
b.onMessage(/\!agree/, function(channel, from, message) {
  var self = this
  console.log(arguments);
  self.message(channel, 'I totally agree.')
})

Contribute

See the readme in the examples dir for development details.

Dan Villa dvilla@collineargroup.com

Based heavily on wobot

Github: hipchat-bot

1.1.0

7 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago