beniocord.js
v2.1.2
Published
Uma biblioteca leve e intuitiva para integração com APIs de bots em plataformas de mensagens, como Discord. Facilita o envio de mensagens, gerenciamento de canais e interação com usuários, proporcionando uma experiência de desenvolvimento ágil e eficiente
Downloads
651
Readme
Getting Started
Introduction Intro
Beniocord.js
A powerful JavaScript library for building Beniocord bots with ease.
About
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.
Features
- 🚀 Easy to use and beginner-friendly
- ⚡ Fast and efficient
- 📦 Object-oriented design
- 🔄 Promise-based architecture
- 🎯 Full Beniocord API coverage
- 💪 TypeScript support
Requirements
- Node.js >= 18
- NPM >= 9
Installation
Install via NPM:
npm install beniocord.jsQuick Example
const 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();