Skip to content

codedocta/UniBot

 
 

Repository files navigation

UniBot = UNiversal Irc Bot

A multi-channel (and eventually multi-server) IRC bot built with Node.js.

Notes

  1. Please don't abuse the mongoDB credentials. I'm too lazy to hide them.
  2. You should change the bot's nick and owner.

Development

Requires MongoDB

  1. Create your own config.js from config.DEFAULT.js (and change the bot name)
  2. npm install
  3. node unibot.js
  4. Register the channel
  5. Install plugins

Plugins

Create new plugins in lib/plugins

  • Add plugins by private messaging the bot plugin [channel] [plugin]
  • Remove plugins by private messaging the bot unplug [channel] [plugin]

Example:

github.js

module.exports = function(channel){
  return {
  	// Regular expression to match
    "#([0-9]+)": function(from, matches) {
    	// do logic ...
    	channel.say('Some message'); // pass a recipient name as an optional second argument
    },
    "...": function(from, matches) {
      	...
	}
  };
};

Commands

PM

  • register [#channel] Joins a channel
  • unregister [#channel] Leaves a channel
  • plugin [#channel] [plugin] Adds a plugin to a channel
  • unplug [#channel] [plugin] Removes a plugin from a channel

Channel

Grouped by Plugin

Commands

Note: :tokens are replaced with any text after the command name. Spaces are replaced with + characters (for search-engine friendliness) Note: :nick is replaced with the name of the user who sent the message

  • !remember [command] is [text with optional :tokens and :nick] Create a !command
  • !forget [command] Delete a !command
  • !show [command] Shows the raw !command
  • [nick:] ![command] [tokens] Say a command

About

One Bot to rule them all, One Bot to find them, One Bot to bring them all and in the darkness bind them

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 87.3%
  • HTML 12.5%
  • CSS 0.2%