Skip to content
A plugin-based HipChat bot written in Node.js.
Pull request Compare This branch is 54 commits behind cjoudrey:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A plugin-based HipChat bot written in Node.js.


The easiest way to obtain Wobot is through npm:

npm install wobot

Keep in mind this module depends on node-xmpp which cannot be built without:

  • libexpat1-dev: apt-get install libexpat1-dev
  • libicu-dev: apt-get install libicu-dev

Your First Bot

Instantiate the wobot.Bot class by passing it a hash containing:

  • jid: Jabber ID followed by /bot
  • password: The account's password
  • name: The name of the bot as it appears in HipChat. This is usually firstname + lastname[0].
var wobot = require('wobot');

var bot = new wobot.Bot({
  jid: '????_????',
  password: '??????',
  name: '???? ????'



The wobot.Bot object extends Node's EventEmitter.

The following events are emitted:


Emitted whenever the bot connects to the server.

message(channel, from, message)

Emitted whenever a message is sent to a channel the bot is in.

pm(from, message)

Emitted whenever a message is sent privately to the bot.


Emitted everytime the bot pings the server (roughly every 30 seconds.)


Emitted whenever the bot disconnects from the server.

Public API

Instances of wobot.Bot have the following methods:


Join a channel.

  • roomJid is in the following format: ????_????


Part a channel.

message(roomJid, message)

Send a public message to the channel.

pm(jid, message)

Send a private message to a user.

  • jid is in the following format: ????_????


Connect to the server.


Disconnect from the server.

loadPlugin(identifier, plugin, options)

Load a plugin.

  • identifier: A unique string that identifies the plugin. This will be used to unload it.
  • plugin: Plugin can either be an object or the path to the plugin.
  • options: Will be passed as the second argument to load.


Unload a plugin. This essentially calls the unload function of the plugin.

Legal stuff

Copyright (c) 2011 Christian Joudrey. See LICENSE for details.

Node.js is an official trademark of Joyent. This module is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.

Something went wrong with that request. Please try again.