Skip to content

axrxvm/betterdiscordjs

Repository files navigation

betterdiscordjs

npm version License: MIT Discord.js Node.js

A modern, modular and dev-friendly discord.js

✨ Features

  • 🎯 Unified Commands - Support for both slash and prefix commands
  • 🔧 Enhanced Context - Simplified Discord API interactions with ctx object
  • 📦 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

🚀 Quick Start

npm install @axrxvm/betterdiscordjs
const { 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();

📖 Documentation

🏗️ 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/betterdiscordjs

Development Setup

git clone https://github.com/axrxvm/betterdiscordjs.git
cd betterdiscordjs

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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!

About

A modern, modular, and extensible framework for Discord.js

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •