🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

dbd.ts

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dbd.ts

A powerful TypeScript package made for Discord Bots with ease.

npmnpm
Version
3.0.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

dbd.ts

dbd.ts

Discord Server NPM Version NPM Downloads


dbd.ts

Installation

Node.JS 16.6.0 or newer is required.

npm install dbd.ts

Example

const dbd = require("dbd.ts")

const bot = new dbd.Bot({
    intents: ["GUILDS", "GUILD_MESSAGES"], //Discord Intents
    prefix: "PREFIX" //Discord Client Prefix
})


bot.addEvent([
    "onMessage"
])

bot.commands.add({
    type: "basicCommand",
    name: "ping",
    code: "Pong! $pingms"
})

bot.login("Discord Bot Token")

Plugins Support

To create a plugin, you first need to have a plugins folder in your project environment (this is not yet customizable).
Create a file in that folder with any name you want, and paste this into your code:

/**
 * This below will only work if you are using a proper IDE, so intellisense does it's job.
 * @type {import("dbd.ts").FunctionData}
 */ 
const func = {
    // This would be the name for the plugin or function.
    name: "$systemChannelID",
    
    // You cannot skip this on typescript, but in javascript.
    description: "return system channel id of the guild.",

    // This function is called every time this function is used.
    execute: (d, fn) => {
        // Watch out! data.message will not always be a Message object, so is recommend to use instanceof to check what it actually is before ever returning anything.
        return fn.resolve(
            d.data.message.guild?.systemChannelID
        )
    }
}

// Export function.
module.exports = func

// Belong line would work too
// module.exports.default = func

Plugins only support js / ts for now.
This should only be used by user(s) who already know typescript or javascript.
We won't give any support regarding plugins as they are not coded by us and therefore is not of our concern of what happens.

Other Support

Slash, Button, Select Menu commands and much more are supported in dbd.ts
It's simple and easy to setup with a few lines of code.

Support

If you need support or have questions to ask, you can join our Discord Server!

Keywords

dbd.ts

FAQs

Package last updated on 19 Aug 2021

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