A powerful JavaScript library for building Beniocord bots with ease.
Beniocord.js is a powerful Node.js module that allows you to easily interact with the Beniocord API. It provides an intuitive and modern approach to bot development.
Install via NPM:
npm install beniocord.jsconst Beniocord = require("beniocord.js");
const client = new Beniocord({ token: 'YOUR_BOT_TOKEN' });
client.on("ready", () => {
console.log("🤖 Bot connected!");
});
client.on("messageCreate", async (msg) => {
if (msg.author?.id === client.user?.id) return;
if (!msg.content.startsWith('!')) return;
const comando = msg.content.slice('!'.length).split(' ')[0];
const args = msg.content.slice(comando.length + '!'.length + 1).trim().split(' ');
if (comando === "ping") {
const msgTimestamp = Date.now() - Date.parse(msg.createdAt);
const sent = await msg.channel.send("🏓 Pinging...");
const editTimestamp = Date.now() - Date.parse(sent.createdAt);
await sent.edit(
`🏓 **Pong!**\n` +
`📨 **Message → Bot:** ${msgTimestamp}ms\n` +
`✏️ **Send → Edit:** ${editTimestamp}ms`
);
}
});
client.login();