A modern, modular Discord bot starter built with TypeScript and Discord.js v14+, designed for performance, scalability, and ease of development. Includes autocomplete, command handling, typed client extensions, and recommended project structure.
- ✅ Slash command registration with autocomplete support
- ✅ Typed
EagleClientextension for scalable architecture - ✅ Centralized command and event management
- ✅ Environment-based config with graceful error handling
git clone https://github.com/prodbyeagle/discord-template.git
cd eaglebot-templateChoose your preferred package manager:
npm install
# or
bun installCreate a .env file in the root directory and add your bot token:
BOT_TOKEN=your-bot-token-hereTo start the bot:
npm run start
# or
bun startMake sure BOT_TOKEN is correctly defined in your .env.
Add new slash commands inside src/commands/ and register them in initializeCommands.ts.
Each command follows a modular structure and supports optional autocomplete.
Create and manage Discord event listeners in src/events/. Events are automatically triggered based on Discord.js lifecycle hooks.
The bot extends Client with custom properties (like commands, audio, etc.). Modify src/client.ts to define your own properties or behaviors.
src/
├── client.ts # Custom client (EagleClient)
├── commands/ # Slash commands
├── events/ # Discord events (ready, interaction, etc.)
├── lib/ # Shared utilities, config, logging
├── modules/ # Functional features like recording/audio
└── types/ # Global type declarations (e.g., ICommand)Pull requests are welcome. If you encounter bugs or have ideas for improvements, feel free to open an issue.
MIT — Feel free to use, modify, and distribute.