Skip to content
Jaya van de Pol

05Open Source

Discord.js Template

A production-ready Discord.js v14 + TypeScript bot template with structured commands, component handlers, multi-database Drizzle ORM and a Vitest test suite.

View source on GitHub ↗

Overview

An open-source starter for Discord bots built with Discord.js v14 and TypeScript. It comes with structured slash and context-menu commands, modular handlers for buttons, select menus and modals, an interactive embed paginator, Zod-validated configuration, deterministic error tracking and multi-dialect Drizzle ORM — so a new bot starts from a solid, tested foundation instead of from scratch.

What it does

Commands

Structured slash commands with dynamic autocompletion, user and message context-menu commands, and built-in cooldowns.

Components

Dedicated handlers for buttons, select menus and modals with exact and RegExp matching, plus an interactive embed paginator with automatic timeout handling.

Multi-dialect database

Drizzle ORM with zero-config SQLite out of the box, and a switch to PostgreSQL or MySQL/MariaDB with a single DATABASE_URL.

Reliability

Zod validates the environment on boot, crashes get deterministic 8-character error hashes that are deduplicated in the database, and command deployment is guarded against Discord rate limits.

Tested and fast to work on

A Vitest suite covers cooldowns, error hashing, configuration and embed builders, and tsx gives instant reloads in development.

Ready to grow

Sharding support for 1000+ servers and developer access controls by user or role.

Built with

Want something like this?

I'm currently accepting new projects and opportunities.