Git Product home page Git Product logo

bluebot's Introduction

Bluebot

An IRC bot that runs on Heroku.

Bluebot is written in Ruby using the Cinch IRC framework. You can easily customize it by using many existing Cinch plugins or by writing your own.

It requires a single Dyno and uses the free MongoHQ add-on as its persistence backend, which means you can essentially run Bluebot on Heroku for free, forever.

Features

  • URL title scraping.
  • Karma system.
  • Quotes manager.
  • Ability to respond as Cleverbot.

Supported commands

Karma system

  • !karma prints your current karma.
  • !karma <foo> prints the current karma for <foo>.
  • <foo>++ increments karma for <foo>.
  • <foo>-- decrements karma for <foo>.

Quotes manager

  • !addquote <quote> records a new quote.
  • !quote prints a random quote.
  • !quote <number> prints quote with index <number>.
  • !lastquote prints the last quote recorded.
  • !searchquote <keywords> prints the quotes matching <keywords>.

Cleverbot integration

Talk to the bot by prefixing your messages with the bot's nickname and it shall respond as Cleverbot.

Example:

    <Louie> Bluebot: What's the Answer to the Ultimate Question of Life, the Universe and Everything?
  <Bluebot> Louie: 42.

Deployment instructions

  1. Set up a new Heroku app and add the free MongoHQ Sandbox add-on.
cd Bluebot
heroku create
heroku addons:add mongohq:sandbox
  1. Tell Bluebot where to connect, what nickname to use, and optionally the required password to identify against the network's NickServ service.
heroku config:set BLUEBOT_SERVER=irc.myserver.com
heroku config:set BLUEBOT_CHANNEL=#mychannel
heroku config:set BLUEBOT_NICK=mybluebot
heroku config:set BLUEBOT_PASSWORD=password         # Optional  
  1. Push the code.
git push heroku master
  1. Launch Bluebot.
heroku scale bluebot=1

You can later shut down the bot by running heroku scale bluebot=0 and relaunch it by running heroku scale bluebot=1.

Local development

As you start customizing the bot and adding new featuers, you'll want to test these changes in your local development environment. In order to do this, you'll have to:

  1. Launch a local MongoDB server.
sudo service mongodb start          # Ubuntu
sudo /etc/init.d/mongodb start      # Debian
systemctl start mongodb             # Arch Linux
  1. Launch Bluebot.
ruby bluebot.rb

By default, Bluebot connects to irc.freenode.net #cinch-bot using the nickname bluebot. You can override this by exporting the necessary global variables (see deployment instructions), e.g.: BLUEBOT_NICKNAME=mybot ruby bluebot.rb.

bluebot's People

Contributors

leandrolovisolo avatar manuelf avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.