Skip to content

Create complete Discord bot base repository with modular command system and server automation#122

Draft
Shin5hi with Claude wants to merge 3 commits into
mainfrom
claude/create-base-repository-for-discord-bot
Draft

Create complete Discord bot base repository with modular command system and server automation#122
Shin5hi with Claude wants to merge 3 commits into
mainfrom
claude/create-base-repository-for-discord-bot

Conversation

@Claude

@Claude Claude AI commented Apr 11, 2026

Copy link
Copy Markdown

Implements a production-ready Discord bot foundation for server automation with modern JavaScript (ES6 modules), Discord.js v14, and comprehensive command/event architecture.

Core Infrastructure

  • Bot System: Main entry point with dynamic command/event loading, error handling, graceful shutdown
  • Configuration: Environment-based config with .env.example template, centralized settings
  • Deployment: Command registration script for slash commands (guild or global)

Command System (12 Commands)

Utility: ping, info, help, userinfo, serverinfo, notes (with persistence)
Moderation: kick, ban, timeout, clear (bulk delete)
Fun: 8ball, poll (with emoji reactions)

Commands include permission checks, cooldowns, category organization, and automatic discovery.

Event Handlers

  • ready - Bot initialization and presence
  • interactionCreate - Command execution with cooldown management
  • guildMemberAdd - Auto-welcome with configurable channels
  • error - Centralized error logging

Utilities

  • Logger: Structured logging with configurable levels
  • Helpers: Embed creation, uptime formatting, permission validation, input sanitization
  • Database: JSON-based key-value store for persistent data (used by notes command)

Deployment

Docker support via Dockerfile and docker-compose.yml with non-root user, volume mounts, and log rotation.

Documentation

  • Setup guide with Discord Developer Portal instructions (Spanish)
  • CONTRIBUTING guide with code style, commit conventions, PR checklist
  • Docker deployment guide
  • ESLint configuration for code quality

Example command structure:

import { SlashCommandBuilder } from 'discord.js';

export default {
  category: 'Utility',
  cooldown: 5,
  data: new SlashCommandBuilder()
    .setName('ping')
    .setDescription('Check bot latency'),
  
  async execute(interaction) {
    // Command implementation
  }
};

The bot can be deployed immediately or extended with additional features (music, economy, leveling, etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants