Skip to content

SamTheDevDE/Herion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Herion Discord Bot Template

A modern, extensible Discord bot template written in TypeScript


Quickstart: Click "Use this template" to create your own repo and get started instantly!


✨ Features

  • Database Integration using Prisma and PostgreSQL
  • Discord.js v14+ with full support for componentsV2 (ContainerBuilder, MessageFlags.IsComponentsV2)
  • TypeScript for Type Safety
  • Automatic Sharding Support
  • Event System
    • Client & Guild Event Handling
  • Command Systems
    • Slash Commands (/ping, /invite, /eval)
    • Message Commands (;ping, ;invite, ;help, ;clear, ;eval)
    • Aliases, cooldowns, permissions, guild/owner-only, etc.
    • Dynamic Help Command with modern Paginator UI and category select menu
  • Interactive Components
    • Button Handlers (e.g., ping refresh)
    • Modal Forms
    • String Select Menus for category navigation
    • Autocomplete Support
  • Paginator Utility for paginated text displays (used in help command, supports category select)
  • Development Tools
    • Hot-reload with Bun
    • Environment Variable Support
    • Structured Project Layout
  • Logging System (colorized, levels)
  • Extensible Loader System for commands, events, and components
  • Example Configs for easy setup

🛠️ Getting Started

Requirements

Installation

# Clone your new repo (after using "Use this template")
bun run start or bun start
cd <your-project-folder>

# Install dependencies
npm install # or bun install

# Start the bot (development)
# for development
# For production
npm run start # or bun run start

📦 All Available Scripts

Below are all scripts available in package.json with explanations:

Script What it does
start Starts the bot in production mode using Bun (bun src/startup)
dev Starts the bot in development mode with hot-reload using Bun (bun --watch src/startup)
dev:all Runs both dev server and Prisma Studio via Turbo (turbo run dev prisma:s)
start:all Runs production server via Turbo (turbo run start)
prisma / p Runs the Prisma CLI (for DB migrations, introspection, etc.)
prisma:generate/g Generates Prisma client code (prisma generate)
prisma:migrate/m Runs the migration script using Bun (bun src/helpers/generateMigration.ts)
prisma:studio/s Opens Prisma Studio, a web UI for your database (prisma studio)
prisma:format/f Formats your Prisma schema file (prisma format)
prisma:tour Formats schema and runs migration (npm run prisma:format && npm run prisma:migrate)

Note: All prisma:* scripts are shortcuts for common Prisma workflows. You can use either the long or short alias (e.g., npm run prisma:s or npm run prisma:studio).


💬 Commands & Usage

Message Commands

Command Description
;help Shows all commands, paginated by category (with select)
;help <command> Shows detailed info about a command
;ping Shows bot and API latency, with a refresh button
;invite Get the bot's invite link with a modern UI
;clear <amount> Clears messages (requires ManageMessages)
;eval <code> Evaluate JavaScript (owner/developer only)

Slash Commands

Command Description
/ping Shows bot and API latency
/invite Get the bot's invite link
/eval Evaluate JavaScript (owner only)

🗂️ Paginator Utility

  • Use the Paginator class from src/utils/Paginator.ts to create paginated text displays with category select menus for any feature.

⚡ Loader System

  • All commands, events, and components are auto-loaded from their respective folders.

⚠️ Limitations

  • Not suitable for large or high-demand bots at the current stage.
  • Use this template primarily for learning, prototyping, or small projects.

🤝 Contributing

Want to help improve Herion?

  • Open a pull request for bug fixes, enhancements, or documentation.
  • Provide clear explanations and concise titles.
  • Don't be discouraged if your PR is declined or ignored.
  • Be respectful and constructive in all discussions.

Important Notice

This template is NOT suitable for production in its current state. Use it as a starting point for learning, prototyping, or personal projects.

About

a modern, extensible discord bot template written in typescript

Topics

Resources

Stars

Watchers

Forks