Skip to content
This repository has been archived by the owner on Jan 21, 2019. It is now read-only.

Kirbi-bot/Kirbi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kirbi Kirbi!

A modular chat bot for Discord/Slack/& more to come.

license Backlog Issues Accepted Issues in Progress Build Status XO code style

Invite the bot to your server: here.

Modules

Kirbi absorbs the functionality of whatever you add to him! We've included a few base features to help with your modules, which we will describe below.

Modules for Kirbi can add commands or other functionality. For example, the kirbi-beer-lookup module adds the !brew command which returns information on breweries and specific brews!

Using Modules

Modules can be autoloaded from either a single file in ./modules/module-name.js or an NPM module/Github repo named kirbi-module-name.

To autoload a module, add the plugin name to the externalModules (or the modules array under the appropriate api name for an api-specific module) array in config/config.json (without the kirbi-):

{
	...
	"externalModules": ["beer-lookup", "xkcd", "urbandictionary"],
	"discord": {
		"modules": ["musicplayer", "moderation"],
		...
	}
}

and make sure to include any external modules as dependencies in the package.json file:

{
  ...
	"dependencies": {
		"kirbi-beer-lookup": "Richardson-Media-House/kirbi-beer-lookup",
		"kirbi-urbandictionary": "Richardson-Media-House/kirbi-urbandictionary",
		"kirbi-xkcd": "Richardson-Media-House/kirbi-xkcd"
		...
 	},
  ...
}

Official Modules

List of external modules for you to include with your installation (if you wish):

API-Specific Modules

General Modules

  • admin => adds a few administrative commands for server owners and bot admins to use
  • beer-lookup => adds the !brew command
  • cocktail-lookup => adds the !cocktail command
  • dice => adds the !roll command
  • dictionary => adds the !define command
  • misc => adds misc commands that don't fall into other categories
  • mongodb => adds support for MongoDB via Mongoose
  • urbandictionary => adds the !urban command
  • random => adds a bunch of random fact commands and fun stuff
  • rss => adds rss feed related commands
  • server => adds the !servers command, and the ability to list out a custom list of server info
  • translator => adds translation commands
  • wikipedia => adds the !wiki command
  • xkcd => adds the !xkcd command

Writing Modules

To write a Kirbi module, create a new NPM module that exports an array named commands of triggers your bot will respond to. You can use a simple callback to display your message in both Slack and Discord, depending on the features you added:

module.exports = (Kirbi) => {
	return {
		commands: [
			'hello'
		],
		hello: {
			description: 'responds with hello!',
			process: (msg, suffix, isEdit, cb) => { cb('hello!', msg); }
		}
	};
};

If you think your plugin is amazing, please let us know! We'd love to add it to our list. Currently, the bot is configured to work with external repositories with the kirbi- prefix, and we'd like to keep that for the official modules that our team makes :)

Installation

Written in Node.JS.

  1. Clone the repo.
  2. Run npm install in the repo directory.

For music playback, you will need ffmpeg installed and in your path variables.

Customization

The examples directory contains example files for the configs, as well as some example commands, rss feeds, and more! These files need to be renamed, without the .example extension, and placed in the /config/ folder.

Running

Before first run you will need to create an auth.json file. A bot token is required. The other credentials are not required for the bot to run, but highly recommended as commands that depend on them will malfunction. See auth.json.example.

To start the bot just run node start.

Updates

If you update the bot, please run npm update before starting it again. If you have issues with this, you can try deleting your node_modules folder and then running npm install again. Please see Installation.

To Do:

Check out our our status page.

Backlog Issues Accepted Issues in Progress

Help

If you need help join us on discord.

Discord