A fully-featured and scalable Discord bot template using Discord.js v14, TypeScript, MongoDB, and hybrid command support (slash + prefix). Perfect for kickstarting a modern, production-ready Discord bot.
- ✅ Built with TypeScript for type safety and scalability
- 🔧 Supports hybrid commands (slash + prefix)
- 🧩 Modular command/event handler structure
- 📦 MongoDB integration via Mongoose
- 🌐 Built-in Discord sharding for scalability across large bots
- 🧪 Includes sample commands and events
- ✨ Clean folder structure and codebase
- 🛡️ Permission & error handling
- 🔁 Ready for production deployment
Follow these steps to set up and run the bot locally:
- Clone the repository
git clone https://github.com/realglaxin/discord-ts-template.git
cd discord-ts-template
- Install dependencies
npm install
- Configure the bot
Rename the example config file and fill in your settings:
mv src/config/config.example.ts src/config/config.ts
Now edit src/config/config.ts
and fill in the details.
- Start the bot (auto-compile)
npm run dev
This will automatically compile TypeScript and run the bot.