Skip to content

dpyro/purplebot

Repository files navigation

PurpleBot

Build Status Known Vulnerabilities

JavaScript Style Guide

An IRC bot using Node.js and modern JavaScript.

Things to do

npm start -- --help

Testing uses Mocha with Chai with Nock HTTP mocking.

npm test

Make the documentation.

npm run doc

This project conforms to JavaScript Standard Style.

npm run lint

Config

Settings

  • server
  • socket
  • channels
  • auth:nick
  • auth:pass
  • plugins:enabled

Plugins

To create a plugin, implement the following interface in either TypeScript or JavaScript in plugins or ~/.purplebot/plugins.

/**
 * Plugin API.
 */
export interface Plugin {
  /**
   * Plugin name used for identification and configuration.
   */
  readonly name: string

  /**
   * Asynchronously load the resources for this plugin.
   */
  load? (bot: PurpleBot, config: Config): Promise<void>

  /**
   * Reset the plugin's data.
   */
  reset? (): Promise<void>
}

References