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

create-discobase

v3.0.3

Published

Easily create and manage your Discord bot with our powerful toolkit! πŸš€

Downloads

289

Readme

Logo

Discord NPM Version NPM License NPM Downloads

DiscoBase

The modern, production-ready framework for building powerful Discord bots with ease.

DiscoBase provides everything you need to create scalable, feature-rich Discord bots using Discord.js v14. Whether you're building a simple utility bot or a complex multi-server system, DiscoBase gives you the tools and flexibility to succeed.

✨ Built on Discord.js v14 πŸš€ Production-ready architecture 🌐 Documentation: discobase.site

πŸš€ Quick Start

Create your Discord bot in seconds:

npx create-discobase@latest

The interactive setup will guide you through:

  • βœ… Edition Selection: Core (package-based) or Source (full customization)
  • βœ… MongoDB Integration: Optional database setup
  • βœ… Admin Dashboard: Built-in web dashboard
  • βœ… Auto Installation: All dependencies installed automatically

⚑ Core Features

πŸ“¦ Command System

  • Slash Commands - Modern Discord interactions
  • Prefix Commands - Traditional text-based commands
  • Hot Reload - Changes apply instantly without restart
  • Command Generator - Scaffold new commands with npm run generate
  • Command Manager - Enable/disable commands with npm run manage

πŸ” Advanced Controls

  • Bot Permissions - Automatic bot permission validation
  • User Permissions - Role-based access control
  • Cooldowns - Built-in rate limiting per user
  • Cooldown Messages - Custom cooldown feedback
  • Role Requirements - Restrict commands to specific roles
  • Owner/Admin Only - Special access controls
  • Dev Mode - Test commands in specific servers

πŸ“Š Dashboard & Monitoring

  • Real-time Stats - Monitor bot performance live
  • Guild Management - View and manage all servers
  • Command Analytics - Track slash & prefix command usage separately
  • Error Logging - Automatic error tracking
  • Activity Tracker - Monitor file changes in real-time

βš™οΈ Developer Experience

  • Auto-detect Intents - Never miss required intents
  • Structured & Scalable - Clean, organized codebase
  • MongoDB Integration - Built-in database support with Mongoose
  • Configurable Functions - Advanced function options
  • Error Recovery - Graceful error handling

πŸ“¦ Installation

Interactive Setup

npx create-discobase@latest

🧩 Command Options

Powerful options available for every command:

| Option | Type | Description | |--------|------|-------------| | ownerOnly | boolean | Only bot owner can use this command | | adminOnly | boolean | Only users in bot.admins can use it | | devOnly | boolean | Only works in developer servers | | botPermissions | array | Required bot permissions (e.g., ['SendMessages', 'ManageChannels']) | | userPermissions | array | Required user permissions (e.g., ['Administrator', 'KickMembers']) | | cooldown | number | Cooldown in seconds before reuse (default: 3) | | disabled | boolean | Disable command without deleting it | | requiredRoles | array | Array of role IDs required to run command |

Example Command:

module.exports = {
  data: new SlashCommandBuilder()
    .setName('ping')
    .setDescription('Replies with pong!'),
  cooldown: 5,
  botPermissions: ['SendMessages'],
  userPermissions: ['SendMessages'],
  async execute(interaction, client) {
    // Your command logic here
  }
};

πŸ“… Event Options

Configure your event handlers with these options:

| Option | Type | Description | |--------|------|-------------| | name | string | Required. The Discord.js event name (e.g., 'messageCreate', 'guildMemberAdd') | | customId | string | For button/select menu interactions - matches the component's customId | | cooldown | number | Cooldown in seconds before reuse | | cooldownMessage | string | Cooldown message to send when user uses command while on cooldown. Use {time} for showing remaining time in message | | botPermissions | array | Required bot permissions (e.g., ['SendMessages', 'ManageChannels']) | | userPermissions | array | Required user permissions (e.g., ['Administrator', 'KickMembers']) | | rateLimit | object | Rate limit configuration |

Example Event:

module.exports = {
  name: 'interactionCreate',
  customId: 'verify-button', //or multiple customIds in array ['verify-button', 'verify-button2']
  cooldown: 5,
  cooldownMessage: 'You are on cooldown! Please try again in {time}.',
  botPermissions: ['SendMessages'],
  userPermissions: ['SendMessages'],
  rateLimit: {
    type: 'user', // 'user', 'guild', 'channel',
    max: 5, // max uses
    window: 60000 // 60 seconds
  },
  
  async execute(interaction, client) {
    // Your event logic here
  }
};

βš™οΈ Configuration

Your config.json structure:

| Parameter | Type | Description | |-----------|------|-------------| | bot.token | string | Required. Your Discord bot token | | bot.id | string | Required. Your Discord bot ID | | bot.admins | array | Optional. List of admin user IDs | | bot.ownerId | string | Optional. The owner's user ID | | bot.developerCommandsServerIds | array | Optional. Server IDs for dev-only commands | | database.mongodbUrl | string | Optional. MongoDB connection URL | | logging.guildJoinLogsId | string | Optional. Channel ID for guild join logs | | logging.guildLeaveLogsId | string | Optional. Channel ID for guild leave logs | | logging.commandLogsChannelId | string | Optional. Channel ID for command logs | | logging.errorLogs | string | Optional. Webhook URL for error logging | | prefix.value | string | Optional. Prefix for text commands |

πŸ”§ Function Options

Advanced function configuration:

| Property | Type | Description | |----------|------|-------------| | once | boolean | Run once then stop | | interval | number | Time (ms) between repeated executions | | retryAttempts | number | Number of retries if function fails | | maxExecution | number | Maximum number of executions allowed | | initializer | number | Initial value/state for setup |

Example:

const exampleFunction = async () => {
  console.log("Function executed!");
};

exampleFunction.config = {
  once: false,
  interval: 10000, // Run every 10 seconds
  retryAttempts: 3,
  maxExecution: 100,
  initializer: 0
};

module.exports = exampleFunction;

πŸ” Activity Tracker

Monitor all file changes in real-time through discobase.json:

{
  "activityTracker": {
    "enabled": true,
    "ignoredPaths": [
      "**/logs/**",
      "**/node_modules/**",
      "**/private/**"
    ]
  }
}

✨ Generate Commands & Events

Create new commands and events instantly:

npm run generate

Supported Builders:

  • EmbedBuilder - Rich embedded messages
  • ButtonBuilder & ActionRowBuilder - Interactive buttons
  • StringSelectMenuBuilder - Dropdown menus
  • ModalBuilder & TextInputBuilder - Input forms

The CLI automatically generates imports and example code!

πŸ“Š Manage Commands & Events

Edit, pause, or delete commands and events:

npm run manage

Features:

  • Enable/disable commands without deleting
  • Edit command properties
  • View all commands and events
  • Bulk operations

πŸ“š Documentation

For complete guides, tutorials, and API reference:

🌐 discobase.site

πŸ’¬ Community & Support

Join our Discord community:

Discord Server

πŸ”— Links

πŸ“œ License

Apache-2.0 Β© DiscoBase Team