1.0.1 • Published 4 years ago

discord.js-plus-plus v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Discord++

Brief Description

Discord++ is an npm package that tries to make coding a Discord bot ever so slightly easier and more enjoyable.

How to use

If you don't know how to install a package, you should get some help, because it's literally typing this in the console:

yarn add discord.js-plus-plus

Or, if you're not a yarn guy, type this:

npm i discord.js-plus-plus

How to code with it

It's quite easy actually. That's the reason I made this package in the first place. In your index.js file, type this:

//                                         Put your token here
//                                                 |
const Discord = require("discord.js-plus-plus")("token");
//       Folder where the commands are
//                    |
Discord.addCommands("cmds", "dpp!");
//                            |
//                 The prefix for commands
function __cmd__(args, e, Discord) {
  // Send a message in the channel
  //         |
  e.channel.send(
    //         Create an embed
    //                |
    new Discord.MessageEmbed()
      // Set the title of the embed
      //  |
      .setTitle("Hello World")
      // Set the description of the embed
      //      |
      .setDescription(args.join(" "))
  );
}
// Set the aliases of the command
//         |
__cmd__.aliases = ["hw", "hello"];

module.exports = __cmd__;

And when you start it with

node .

and invite the bot to a server, if you now type dpp!helloworld, dpp!hw or dpp!hello followed by text afterwards, the bot will reply with an embed with the title of "Hello World" and a description of said text.

test.png

Bye

That's pretty much it. Bye!

1.0.1

4 years ago

1.0.0

4 years ago