JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 87
  • Score
    100M100P100Q39992F
  • License ISC

Is a wrapper package of Discord.JS that can make bots can communicate with other bots throught our site (We use socket.io for this) and the bots must those use this package. And also this package have command handler that can help Devs set their bots' commands!

Package Exports

  • @evodev/discord.plus

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@evodev/discord.plus) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Discord.Plus


Discord.Plus is Wrapper for Discord.JS which utilize bot communication using Socket.IO. Easily communicate with other bots using Discord.Plus. Discord.Plus also has a built in command handler to help you make your bot easily.


How To Use

Command Handler Example


const { CommandHandler } = require("@evodev/discord.plus");
const { Client }         = require("discord.js");
const prefix             = "!";
const handler            = new CommandHandler();

handler.set("say", {
  name: "say",
  run: async (client, message, args) => {
    return message.channel.send(args.join(" "));
  }
});

client.on("message", async message => {
  const args = msg.content
    .trim()
    .slice(prefix.length)
    .split(/ +/g);
  const cmd = args.shift().toLowerCase();
  if (cmd.charAt(0) !== prefix) return;
  // Running command based on input
  if (!handler.has(cmd)) return;
  handler.get(cmd)(client, message, args);
});

Communication Example


let BetterDiscord = require("@evodev/discord.plus");
let cBD           = new BetterDiscord.Communicate("your_bot_token"); //you can put DiscordClient object here tho.

cBD.on("ready", () => {
  cBD.on("message", res => {
    console.log(`${res.user.id}: ${res.message.content}`);
    cBD.sendMessage(
      "message",
      ({ message: "Received your message dude!", id: res.user.id },
      msg => {
        //you can use this msg object for anything you want.
      })
    );
  });
});

Support



Developer


  • Gaia#7541 (Discord)
  • Hyp3r#0001 (Discord)
  • Odd Stranger#7957 (Discord)

Want to support us?


  • Gaia's PayPal: nekomaru76