0.1.4 • Published 5 years ago

discord.js-router v0.1.4

Weekly downloads
1
License
GPL-3.0-or-later
Repository
github
Last release
5 years ago

discord.js-router

Build Status dependencies dev dependencies

Downloads Downloads npm version License

Code Climate Discord Chat PayPal

Discord is a trademark or registered trademark of Hammer & Chisel, Inc. in the U.S. and/or other countries. "discord.js-router" is not operated by, sponsored by, or affiliated with Hammer & Chisel Inc. in any way.

Install

$ npm install discord.js-router

Information

Documentation on Object Class Structure & Functions can be found at the Official Github Pages Tutorials, Guides, and More can be Found at the Official Github Wiki

If any information is Lacking please Post a Question in the Github Issues Section.

Example Code can be Found master/example

Example Project:

Usage of the Discord.js Router

Configure

Config Options

Base
{
  plugins_dir: String, // Required
  token: String, //Required unless you Launch it as a Shard of Discord.js
  trigger: String, //Required this is what makes your bot respond to people "pw!"
  reactions: Boolean, // Optional this will allow you to get reaction events sent too your Plugins.
  guilds: Boolean, // Optional this will allow you to get Guild Join/Part events sent to your Plugins.
  members: Boolean, // Optional this will allow you to get Member Join/Part events for Guilds sent to your Plugins.
  owners: Array of String // Required Array of Owner IDs in String format.
}
Example
var discord = require('discord.js-router');

discord.Start({
  plugins_dir: "plugins", // This Directory must Exist
  token: "YourBotTokenGoesHere", // Replace with String for the Discord Token.
  trigger: "dev!",
  owners: ["165372475562000385"]
});

Issue

If any Issues Please Submit them on the Github!

Example

/index.js

var options = {
  plugins_dir: "plugins",
  token: null, // Replace with String for the Discord Token.
  trigger: "dev!",
  owners: ["165372475562000385"]
};

var discord = require('discord.js-router');

discord.Start(options);

process.on('uncaughtException', function(err) {
	console.log(`uncaughtException: ${err}`);
});
process.on('unhandledRejection', function(err) {
  console.log(`unhandledRejection: ${err}`)
});

/plugins/test.js

var discord = require('discord.js-router');

discord.on('cmd', function(cmd, args, data) {
  if (cmd == "test") {
    data.channel.send("This works");
  } else if (cmd == "reload") {
    discord.ReloadPlugins();
    data.channel.send("Plugins are Reloaded!");
  }
});
0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago