Launch Week Day 1: Socket for Jira Is Now Available.Learn More β†’
Socket
Book a DemoSign in
Socket

create-discobase

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-discobase

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

latest
Source
npmnpm
Version
3.0.3
Version published
Weekly downloads
56
86.67%
Maintainers
1
Weekly downloads
Β 
Created
Source

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:

OptionTypeDescription
ownerOnlybooleanOnly bot owner can use this command
adminOnlybooleanOnly users in bot.admins can use it
devOnlybooleanOnly works in developer servers
botPermissionsarrayRequired bot permissions (e.g., ['SendMessages', 'ManageChannels'])
userPermissionsarrayRequired user permissions (e.g., ['Administrator', 'KickMembers'])
cooldownnumberCooldown in seconds before reuse (default: 3)
disabledbooleanDisable command without deleting it
requiredRolesarrayArray 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:

OptionTypeDescription
namestringRequired. The Discord.js event name (e.g., 'messageCreate', 'guildMemberAdd')
customIdstringFor button/select menu interactions - matches the component's customId
cooldownnumberCooldown in seconds before reuse
cooldownMessagestringCooldown message to send when user uses command while on cooldown. Use {time} for showing remaining time in message
botPermissionsarrayRequired bot permissions (e.g., ['SendMessages', 'ManageChannels'])
userPermissionsarrayRequired user permissions (e.g., ['Administrator', 'KickMembers'])
rateLimitobjectRate 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:

ParameterTypeDescription
bot.tokenstringRequired. Your Discord bot token
bot.idstringRequired. Your Discord bot ID
bot.adminsarrayOptional. List of admin user IDs
bot.ownerIdstringOptional. The owner's user ID
bot.developerCommandsServerIdsarrayOptional. Server IDs for dev-only commands
database.mongodbUrlstringOptional. MongoDB connection URL
logging.guildJoinLogsIdstringOptional. Channel ID for guild join logs
logging.guildLeaveLogsIdstringOptional. Channel ID for guild leave logs
logging.commandLogsChannelIdstringOptional. Channel ID for command logs
logging.errorLogsstringOptional. Webhook URL for error logging
prefix.valuestringOptional. Prefix for text commands

πŸ”§ Function Options

Advanced function configuration:

PropertyTypeDescription
oncebooleanRun once then stop
intervalnumberTime (ms) between repeated executions
retryAttemptsnumberNumber of retries if function fails
maxExecutionnumberMaximum number of executions allowed
initializernumberInitial 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

πŸ“œ License

Apache-2.0 Β© DiscoBase Team

Built with ❀️ by the DiscoBase Team

Keywords

discord

FAQs

Package last updated on 28 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts