Introduction

The Official DBD.JS Version 4.0.0x Documentation

Setting up

To begin you must install the package

You must be on NodeJS v14 and above to ensure it will work properly.

This should take approximately couple of seconds to install.

Once you've installed the package we can initialize the setup.

index.js
index.js
const dbd = require("dbd.js");
const bot = new dbd.Bot({
intents: true,
prefix: "PREFIX",
revertReading: false,
})
bot.enableEvent("message"); //Allow to runs Commands
bot.enableEvent("ready"); //Executes when Client is Ready
const id = bot.createCommmand({code:"$log[$username[$clientID] is Ready.]"});
bot.assignType(bot.Types.Ready, id);
bot.login("TOKEN")

You must enter a prefix via PREFIX

You must enter a valid Discord Bot Token via TOKEN

Usage of Command

index.js
index.js
bot.assignType(bot.Types.Message, bot.createCommmand({
name:"command",
code:"code"
}))

Example + Command

index.js
index.js
const dbd = require("dbd.js");
const bot = new dbd.Bot({
intents: true,
prefix: "PREFIX",
revertReading: false,
})
bot.enableEvent("message"); //Allow to runs Commands
bot.enableEvent("ready"); //Executes when Client is Ready
const id = bot.createCommmand({code:"$log[$username[$clientID] is Ready.]"});
bot.assignType(bot.Types.Ready, id);
/*COMMAND EXAMPLE BELOW*/
bot.assignType(bot.Types.Message, bot.createCommmand({
name:"ping", //Command Name
code:"Pong! $pingms" //Returns <Websocket Ping> ms
}))
bot.login("TOKEN")