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)

ignoreAllErrors: boolean

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

insensitive

(false by default)

insensitive: boolean

Whether the functions can be read as case insensitive.

intents

intents: ["intent1", "intent2", "intent3"]

The intents for this bot.

internalSharding

(false by default)

internalSharding: boolean

Whether to use internal sharding on this bot.

prefix

prefix: ["prefix1", "prefix2", "prefix3"]

OR

prefix: "string"

The prefix or prefixes for this bot.

reverseReading

(false by default)

reverseReading: boolean

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

token: string

The token for this bot.

Last updated