Adding Events
bot.addEvent([
"onMessage", //every bot should have this
"event2",
"event3"
])Example
const dbd = require("dbd.ts")
const bot = new dbd.Bot({
intents: ["GUILDS", "GUILD_MESSAGES"],
prefix: "PREFIX"
})
bot.addEvent([
"onMessage",
"onReady",
"onInteraction",
"onJoin",
"onLeave",
"onBotJoin",
"onBotLeave",
"onReactionAdd",
"onReactionRemove",
"onLavalinkSongStart",
"onLavalinkSongFinish"
])
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")Events
Last updated
Was this helpful?