Skip to content

Latest commit

 

History

History
94 lines (67 loc) · 2.61 KB

README.MD

File metadata and controls

94 lines (67 loc) · 2.61 KB

dbd.js

DBD.EZ

DBD.EZ is an powerful wrapper over discord.js allowing you
to make discord bots in no time,No need to learn
coding but still make God level Discord bots!

Table Of Contents

Dev Note: This is still in beta, Join support server for any support, Big updates are coming!

Usage Example

Setup

const discord = require("dbd.ez");

const client = new discord({
  token: "TOKEN", //Your Discord Bot Token
  prefix: "-",
});

client.command({
  name: "say",
  reply: "{args.all}",
  argsError: {
    1: "You must send atleast one arg",
  }, //unlike js where args start from 0 in dbd.ez args start from 1 for the sake of simplicity.
});

Constants

Constants are to simplify your work, example:

client.command({
  name: "ping",
  reply: "🏓 Pong, API latency is {ping}ms",
});

here {ping} gets converted to actual API ping when bot replies

Per-Command-Events

What are events?

When you use dbd.ez you will register a command with .command({}), we cannot run anything we want when a command is executed, here comes per-cmd-events, this will help you do any task when a command is executed, example:

client.on("command-ping", (message) => {
  console.log("Ping command has been used!");
}); //The event is emitted along with discord.js message object

client.command({
  name: "ping",
  reply: "🏓 Pong, API latency is {ping}ms",
}); //You must register the command like this for per-cmd-events to work

Note: Since this package is very new, this is still in beta, we don't recommend you to use this until we release a stable release, stable release is v1 and above!


constants-list

{ping} - Discord API latency
{author.tag} - The command author's Tag
{author} - Pinging The command author
{author.id} - user id of the message author
{args<number>} Example: args1 - args of the message
{args.all} - The whole message after command {args.allFrom<number>} Example: args.allFrom2 - Whole message after the mentioned args
{author.name.} - The command author's name

More constants will be added everyday, Thanx for choosing us!

Development

DBD.EZ is made by Dynastic Studios