HipchatBot

Simple and configurable bot for Hipchat!

Obviously adapted from https://github.com/gammons/happy_fun_time_bot, but revised with a new shorter name and to work on Ruby 1.9.3 since the original is broken.

100% of the credit to https://github.com/gammons/happy_fun_time_bot and gammons for this gem. I just made it work on 1.9.3

Lets take a look!

#!/usr/bin/env ruby

require 'rubygems'
require 'hipchat_bot'

@bot = HipchatBot.new(:jid => "[email protected]", 
                           :nick => "Hipchat Bot", 
                           :room => "[email protected]", 
                           :password => "xxxx")

@bot.add_responder('heybot') do |from, args|
  "Oh HAI #{from}!!!"
end

@bot.run!
Bob: !heybot what's up?
HipChat Bot:  Oh HAI Bob!!!

So many IdeazzZz!!

Add responders to insert random images of dogs in costumes!

Bob: !findimage dog costume
HipChat Bot: Here ya go!

Kick off a build!

Bob: !build_the_app
HipChat Bot: All tests PASSED!

Deploy your app!

Bob: !deploy
HipChat Bot: Deploying now!

Bot creation Options:

  • :jid - Required.
  • :nick - The nickname for the bot to use.
  • :room - Required. The room to enter.
  • :password - The bot's password.
  • :command_regex - The regular expression to test for a command. The default is a ! followed by a word. e.g. /^!(.+)$/

Copyright (c) 2012 Nathan Esquenazi. See LICENSE.txt for further details. Copyright (c) 2011 Grant Ammons. See LICENSE.txt for further details.