npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2026 – Pkg Stats / Ryan Hefner

boda-handler

v2.0.0

Published

πŸš€ Advanced Discord Bot Handler Library with Beautiful Console Interface

Readme

πŸš€ Boda Handler v2.0.0

Version License Node Discord.js

✨ Features

  • 🎨 Beautiful Console Interface - Stunning visual feedback with colors, animations, and tables
  • 🌈 Multiple Themes - Choose from Default, Neon, or Dark themes
  • ⚑ Lightning Fast - Optimized performance with async/await throughout
  • πŸ”§ Interactive CLI - Complete command-line interface for easy management
  • πŸ“Š Real-time Statistics - Monitor your bot's performance and usage
  • 🎯 Smart Error Handling - Comprehensive error tracking and reporting
  • πŸ”„ Auto-reload - Automatic command and event reloading
  • πŸ“± Slash Commands - Full support for Discord's slash commands
  • πŸ›‘οΈ Type Safety - Built with modern JavaScript standards
  • πŸš€ Easy Setup - Get started in seconds with our interactive wizard

🎬 Demo

# Initialize with beautiful animations
npx boda-handler init

# Interactive setup wizard
npx boda-handler setup

# Create components instantly
npx boda-handler create command ping
npx boda-handler create slash userinfo
npx boda-handler create event guildMemberAdd

πŸ“¦ Installation

npm install boda-handler

πŸš€ Quick Start

Method 1: Using CLI (Recommended)

# Interactive setup with beautiful interface
npx boda-handler setup

# Or quick initialization
npx boda-handler init --theme neon

Method 2: Programmatic Setup

const BodaHandler = require('boda-handler');

const handler = new BodaHandler({
  theme: 'neon',        // 'default', 'neon', 'dark'
  animation: true,      // Enable beautiful animations
  showStats: true,      // Display performance statistics
  silent: false         // Show all output
});

await handler.init();

🎨 Themes

🌈 Neon Theme (Default)

Vibrant colors with electric blue and hot pink accents

πŸ”΅ Default Theme

Classic blue and green color scheme

πŸŒ‘ Dark Theme

Elegant monochrome with bright accents

πŸ› οΈ CLI Commands

| Command | Description | Options | |---------|-------------|---------| | init | Initialize new bot project | --theme, --silent, --no-animation | | setup | Interactive setup wizard | None | | create <type> <name> | Create command/event/slash | --category, --description | | info | Show handler information | None |

Examples:

# Create a moderation command
npx boda-handler create command ban --category "Moderation" --description "Ban a user"

# Create a welcome event
npx boda-handler create event guildMemberAdd --description "Welcome new members"

# Create a slash command
npx boda-handler create slash ping --description "Check bot latency"

πŸ“ Project Structure

your-bot/
β”œβ”€β”€ πŸ“ Handler/
β”‚   β”œβ”€β”€ Commands.js       # Command loader with beautiful output
β”‚   β”œβ”€β”€ Events.js         # Event loader with status tracking
β”‚   └── SlashCommand.js   # Slash command handler
β”œβ”€β”€ πŸ“ Commands/
β”‚   └── ping.js          # Example command with rich embed
β”œβ”€β”€ πŸ“ Events/
β”‚   β”œβ”€β”€ ready.js         # Bot ready event with stats
β”‚   β”œβ”€β”€ messageCreate.js # Message handler
β”‚   └── interactionCreate.js # Interaction handler
β”œβ”€β”€ πŸ“ SlashCommand/
β”‚   └── serverinfo.js    # Example slash command
β”œβ”€β”€ πŸ“ Config/
β”‚   └── config.js        # Bot configuration
β”œβ”€β”€ πŸ“„ .env              # Environment variables
└── πŸ“„ index.js          # Main bot file

πŸ”§ Configuration

Environment Variables (.env)

# Discord Bot Configuration
TOKEN=your_bot_token_here
PREFIX=-
OWNER_ID=your_user_id_here

# Handler Configuration
THEME=neon
SHOW_STATS=true
ANIMATION=true

Config File (Config/config.js)

module.exports = {
  bot: {
    prefix: process.env.PREFIX || '-',
    token: process.env.TOKEN,
    ownerID: process.env.OWNER_ID
  },
  handler: {
    theme: 'neon',
    showStats: true,
    animation: true,
    silent: false
  },
  // ... more configuration options
};

πŸ“ Creating Commands

Regular Commands

module.exports = {
  name: 'ping',
  description: 'Check bot latency',
  category: 'Utility',
  usage: 'ping',
  cooldown: 3000,
  run: async (client, message, args) => {
    const embed = {
      color: 0x00ff00,
      title: 'πŸ“ Pong!',
      fields: [
        {
          name: 'πŸ“‘ WebSocket Ping',
          value: `${client.ws.ping}ms`,
          inline: true
        }
      ]
    };
    
    message.reply({ embeds: [embed] });
  }
};

Slash Commands

module.exports = {
  name: 'serverinfo',
  description: 'Get server information',
  options: [
    {
      name: 'detailed',
      description: 'Show detailed information',
      type: 5,
      required: false
    }
  ],
  run: async (client, interaction) => {
    // Your slash command code
    await interaction.reply({ content: 'Server info!' });
  }
};

🎭 Events

const chalk = require('chalk');

module.exports = async (client, member) => {
  console.log(chalk.green(`βœ… New member joined: ${member.user.tag}`));
  
  // Your event code here
};

πŸ“Š Statistics & Monitoring

The handler automatically tracks:

  • ⏱️ Setup time and performance
  • πŸ“ˆ Commands loaded and executed
  • 🎭 Events registered and triggered
  • ❌ Errors and warnings
  • πŸ“Š Real-time bot statistics

πŸ” Advanced Features

Custom Themes

const handler = new BodaHandler({
  theme: 'custom',
  customTheme: {
    primary: chalk.hex('#your-color'),
    secondary: chalk.hex('#your-color'),
    // ... more colors
  }
});

Performance Monitoring

const stats = handler.getStats();
console.log('Commands loaded:', stats.commandsLoaded);
console.log('Setup time:', stats.setupTime);

Error Tracking

All errors are automatically logged with beautiful formatting and context information.

πŸ›‘οΈ Error Handling

The handler includes comprehensive error handling:

  • Command execution errors
  • Event listener errors
  • File loading errors
  • API communication errors

All errors are displayed with beautiful formatting and helpful context.

πŸš€ Pro Tips

  1. Use Environment Variables - Keep your token secure in .env
  2. Organize Commands - Use categories to organize your commands
  3. Custom Themes - Create your own theme for unique branding
  4. Monitor Performance - Enable statistics to track bot performance
  5. Interactive Setup - Use npx boda-handler setup for best experience

🀝 Contributing

We welcome contributions! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Boda - Creator and maintainer

🌟 Support

If you find this handler useful, please consider:

  • ⭐ Starring the repository
  • πŸ› Reporting bugs
  • πŸ’‘ Suggesting new features
  • πŸ“’ Sharing with others