Bot Options

Customize your bot and experience with DBD.TS using bot options! ✨

Example With Additional Options

const dbd = require("dbd.ts")

const bot = new dbd.Bot({
    intents: ["GUILDS", "GUILD_MESSAGES"],
    prefix: "!",
    ignoreAllErrors: true,
    insensitive: true,
    reverseReading: true,
    internalSharding: false
})

bot.addEvent([
    "onMessage",
    "onInteraction"
])

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

bot.commands.add({
    type: "basicCommand",
    name: "eval",
    code: `$onlyForIDs[$botOwnerID;]
$eval[$message]`
})

bot.login("TOKEN")

Options

ignoreAllErrors

(false by default)

Suppresses all errors thrown by the interpreter and outputs nothing instead, this can be overriden in commands.

insensitive

(false by default)

Whether the functions can be read as case insensitive.

intents

The intents for this bot.

internalSharding

(false by default)

Whether to use internal sharding on this bot.

prefix

OR

The prefix or prefixes for this bot.

reverseReading

(false by default)

Reverses code reading of functions (bottom to top, right to left. Instead of top to bottom, left to right), this can be changed in commands.

token

The token for this bot.

Last updated

Was this helpful?