New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

discord.js-router

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord.js-router

This is a Base Bot Router for Discord.js this allows for the Handling of Plugins, and a Trigger Easily.

  • 0.0.8
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

discord.js-router

Build Status semantic-release

Downloads Downloads npm version License

dependencies dev dependencies

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

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
  reactions: Boolean, // Optional
  guilds: Boolean, // Optional
  members: Boolean, // Optional
  owners: Array of String // Required
}
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!");
  }
});

Keywords

FAQs

Package last updated on 27 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc