discord.js-router



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
Tutorials, Guides, and More can be Found at the Official 
If any information is Lacking please Post a Question in the
Section.
Example Code can be Found 
Example Project:
Usage of the Discord.js Router
Configure
Config Options
Base
{
plugins_dir: String,
token: String,
trigger: String,
reactions: Boolean,
guilds: Boolean,
members: Boolean,
owners: Array of String
}
Example
var discord = require('discord.js-router');
discord.Start({
plugins_dir: "plugins",
token: "YourBotTokenGoesHere",
trigger: "dev!",
owners: ["165372475562000385"]
});
Issue
If any Issues Please Submit them on the Github!
Example
/index.js
var options = {
plugins_dir: "plugins",
token: null,
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!");
}
});