Globot is a project mainly written in Ruby, based on the MIT license.
The globaldev Campfire chat bot.
Globot is the globaldev chat bot. He's young at the moment, but hopefully growing up quickly.
Globot relies on Redis for persistent storage for plugins. The default configuration provided assumes Redis is running on localhost
on the default port (6379
), and uses database 0
.
git clone git://github.com/timblair/globot.git
.globot.yml
file based on the provided globot.yml.example
, entering the rooms you want the bot to join, and the appropriate account name and API key.globot.yml
.bundle install
to make sure you've got the gems you need.bundle exec bin/bot start
to run in the console.Creating a new plugin is as simple as creating a new class which extends from Globot::Plugin::Base
, and that defines the handle
method, which takes in an instance of Globot::Message
as a single argument. For example, a plugin which welcomes a user when they join the room could be written as follows:
class MyTestPlugin < Globot::Plugin::Base
def handle(msg)
msg.reply "Hello, #{msg.person.name}" if msg.type == 'EnterMessage'
end
end
Copyright (c) 2011 Tim Blair.
Work has been released under the MIT license as detailed in the LICENSE file that should be distributed with this library; the source code is freely available.