Skip to content

Creating a Processor

Bioblaze Payne edited this page Aug 13, 2020 · 1 revision

All Processors must be structured as such.

  • /processors/
  • /processors/new_processor/
  • /processors/new_processor/new_processor.js
  • /processors/new_processor/new_processor.json
  • /processors/new_processor/README.me

Base Processor.js File.

const fs = require('fs');
const path = require('path');
const util = require('util');

const Bot = require('../../modules/Bot.js');

//APACHE 2.0 LICENSE: https://spdx.org/licenses/Apache-2.0.html#licenseText

module.exports = {
  name: '', // Name of the Processor in all lowercase no spaces. Keep the names short. example: new-proc.
  description: "", // Standard description of the Plugin, a Single Sentence is enough.
  author: "", // Author of the Plugin, this can be Discord Name, Github Repo Link, Twitter url, etc.
  license: "", // LICENSE in which you release the usage of the Plugin. We suggest APACHE-2.0 as listed above.
  activate() {}, // This will trigger every-single time the Plugin is activated, make sure you do startup, cron jobs, etc here.
  deactivate() {}, // This will trigger when the bot is deactivated, use this to do cleanup for timers and the such.
  process(data, callback) {}, // callback(err, skip) || if skip == true this will not be processed as a command within the index.js for the bot.
};

This will increase with documentation as 2.0.0 becomes more available.

Clone this wiki locally