A TypeScript-first Discord command handler template focused on modular command/event architecture.
Status: legacy template targeting
discord.js@13and Node 14+.
This repository provides a starter base for bots that need:
- Prefix command handling
- Slash command support baseline
- Event-driven structure
- Environment-based configuration
src/
Database/
Events/
Typings/
config.ts
index.ts
main.ts
- Node.js
>=14 - npm or yarn
- MongoDB instance (optional, if your bot uses DB features)
- Install dependencies:
npm install
- Create env file:
cp .env.example .env
- Fill required variables in
.env. - Run the bot:
npm run start
npm run start→ run withts-nodenpm run dev→ auto-reload development modenpm run typecheck→ TypeScript validation (no emit)npm run build→ compile projectnpm run check→ typecheck + build (CI-equivalent local gate)
| Variable | Description |
|---|---|
TOKEN |
Discord bot token |
MONGO_URI |
MongoDB connection string |
- CI runs typecheck + build on pushes/PRs (
.github/workflows/ci.yml) - See docs/DEVELOPMENT.md for onboarding and local checks
- See CONTRIBUTING.md
- See ROADMAP.md for modernization priorities
Apache-2.0