@axrxvm/betterdiscordjs
v1.1.1
Published
A modern, modular and dev-friendly discord.js
Maintainers
Readme
betterdiscordjs
A modern, modular and dev-friendly discord.js
✨ Features
- 🚀 CLI Tool - Scaffold new projects with
npx @axrxvm/betterdiscordjs create - 🎯 Unified Commands - Support for both slash and prefix commands
- 🔧 Enhanced Context - 100+ methods covering the entire Discord.js API
- 📦 Plugin System - Modular architecture with built-in plugins
- ⚡ Hot Reloading - Development-friendly command and event reloading
- 🛡️ Built-in Security - Rate limiting, permissions, and error handling
- 📊 Statistics & Logging - Command tracking with beautiful colored logs
- 🎨 Rich Embeds - Intuitive embed builder with fluent API
- ⏰ Task Scheduling - Cron jobs and interval-based tasks
- 📘 TypeScript Support - Full type definitions and ESM/CommonJS dual package
- 🎯 Modern ESM - Native ES modules support alongside CommonJS
- 🧩 Modular Managers - Separate CommandManager, EventManager, InteractionManager
- 🔘 Component Builders - Fluent API for buttons, select menus, and modals
- 🎭 Interaction Handlers - Built-in support for all Discord interaction types
- 🔄 Advanced Collectors - Message, reaction, and component collectors
- 📑 Pagination - Easy-to-use paginator for embeds
- 🎪 Modals & Dialogs - Multi-step forms and user input
- 🧵 Thread Support - Full thread management capabilities
- 🪝 Webhooks - Create and manage webhooks easily
- 🛠️ Moderation Tools - Kick, ban, timeout, bulk delete, and more
🚀 Quick Start
Using the CLI (Recommended)
npx @axrxvm/betterdiscordjs create my-bot
cd my-bot
# Configure .env with your bot token
npm startManual Setup
npm install @axrxvm/betterdiscordjsconst { Bot } = require('@axrxvm/betterdiscordjs');
const bot = new Bot(process.env.DISCORD_TOKEN, {
prefix: '!',
commandsDir: './commands',
eventsDir: './events'
});
// Inline command
bot.command('ping', async (ctx) => {
await ctx.reply('🏓 Pong!');
});
// Event handler
bot.on('ready', (ctx) => {
console.log(`${ctx.user.tag} is ready!`);
});
bot.start();TypeScript Setup
import { Bot, BotConfig } from '@axrxvm/betterdiscordjs';
const config: BotConfig = {
token: process.env.DISCORD_TOKEN!,
prefix: '!',
commandsPath: './commands',
eventsPath: './events'
};
const bot = new Bot(config);
bot.command('ping', async (ctx) => {
await ctx.reply('🏓 Pong!');
});
await bot.login();See TYPESCRIPT.md for complete TypeScript documentation.
📖 Documentation
- 📚 Full Documentation
- 📘 TypeScript Guide
- ⚡ Enhanced Features & API
- � Quick Start Guide
- 🛠️ CLI Tool
- 🔄 Migration from Discord.js
- 🔌 Plugin Development
- 📋 API Reference
- 💡 Examples
🏗️ Project Structure
├── Bot.js # Main bot class
├── index.js # Framework entry point
├── loaders/ # Command and event loaders
├── plugins/ # Plugin system and built-in plugins
├── utils/ # Utilities (cache, logger, scheduler, etc.)
├── testbot/ # Example bot implementation
└── docs/ # Comprehensive documentation🔌 Plugin System
betterdiscordjs includes a powerful plugin system with built-in plugins:
const { Bot, plugins } = require('@axrxvm/betterdiscordjs');
const bot = new Bot(token)
.use(plugins.WelcomePlugin)
.use(plugins.ModerationPlugin)
.use(plugins.AutoModPlugin);
bot.start();🛠️ Requirements
- Node.js 16.9.0 or higher
- Discord.js v14.22.1
- A Discord bot token
📦 Installation
Using the Framework
npm install @axrxvm/betterdiscordjsDevelopment Setup
git clone https://github.com/axrxvm/betterdiscordjs.git
cd betterdiscordjs🤝 Contributing
We welcome contributions! Please see our Contributing Guidelines.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
🙏 Acknowledgments
- Built on top of the powerful discord.js
- Inspired by modern web frameworks
- Made with ❤️ for the Discord developer community
⭐ Star this repo if you find it helpful!
