Skip to content

SamTheDevDE/Herion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ Herion

A premium, feature-rich Discord bot written in TypeScript


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


✨ Features

  • 🗄️ Database — Drizzle ORM with PostgreSQL, type-safe queries, auto-generated migrations
  • 🤖 Discord.js v14+ — Full support for Components V2 (ContainerBuilder, Sections, Thumbnails)
  • 📡 Webhook Logging — Send error, info, and debug logs to Discord webhooks
  • 🛡️ Auto-Moderation — Invite link detection, spam protection, configurable link blocking
  • 📊 Statistics — Bot stats, system info, memory usage, uptime tracking
  • 👤 User & Server Info — Rich user/server information commands with Components V2
  • ⚡ Command Systems
    • Slash Commands (/ping, /invite, /stats, /userinfo, /serverinfo, /eval)
    • Message Commands (;ping, ;help, ;invite, ;clear, ;eval)
    • Aliases, cooldowns, permissions, guild/owner-only, argument validation
    • Dynamic Help Command with paginated UI and category select menu
  • 🎨 Interactive Components
    • Button Handlers (e.g., ping refresh)
    • Modal Forms
    • String Select Menus for category navigation
    • Autocomplete Support
    • Message & User Context Menus
  • 📝 Logging System — Colorized console output + daily file logs with ANSI stripping
  • 🔧 Developer Tools — Hot-reload with Bun, eval commands, environment variable support
  • 📦 Structured Project Layout — Clean architecture with auto-loading for all components

🚀 Getting Started

Requirements

Installation

# Clone the repo
git clone https://github.com/SamTheDevDE/Herion.git
cd Herion

# Install dependencies
bun install

# Set up environment variables
cp example.env .env
# Edit .env with your bot token, database URL, etc.

# Push database schema
bun run drizzle:push

# Start in development mode
bun run dev

# Or start in production
bun run start

📋 Environment Variables

Variable Description
BOT_TOKEN Your Discord bot token
DATABASE_URL PostgreSQL connection string
CLIENT_ID Your bot's application ID
GUILD_ID Development guild ID (optional)
OWNER_ID Your Discord user ID
PREFIX Message command prefix (default: ;)
NODE_ENV development or production
DEBUG Enable debug logging (true/false)
LOG_ERROR_WEBHOOK Discord webhook URL for error logs
LOG_INFO_WEBHOOK Discord webhook URL for info logs
LOG_DEBUG_WEBHOOK Discord webhook URL for debug logs

📜 Available Scripts

Script Description
start Start the bot in production mode
dev Start with hot-reload (Bun watch)
dev:all Dev server + Drizzle Studio
drizzle:generate Generate migration files
drizzle:migrate Run pending migrations
drizzle:push Push schema directly to DB
drizzle:studio Open Drizzle Studio (web UI)
drizzle:tour Generate + migrate in one step

🎮 Commands

Slash Commands

Command Description
/ping Shows bot and API latency
/invite Get the bot's invite link
/stats Bot statistics and system info
/userinfo [target] User information
/serverinfo Server information
/eval <code> Evaluate JavaScript (owner only)

Message Commands

Command Description
;help Shows all commands, paginated by category
;help <command> Detailed info about a command
;ping Shows bot latency with refresh button
;invite Get the bot's invite link
;clear <amount> Clear messages (requires ManageMessages)
;eval <code> Evaluate JavaScript (owner only)

🏗️ Project Structure

src/
├── classes/          # Core classes (Database, Logger, WebhookLogger)
├── commands/         # Message & slash commands
│   ├── message/      # Prefix-based commands
│   └── slash/        # Slash commands
├── db/               # Drizzle schema & client
├── events/           # Discord event handlers
│   ├── client/       # Client events (ready, interactions, messages)
│   └── guild/        # Guild events (join, leave)
├── helpers/          # Utility scripts
├── interactions/     # Component handlers
│   ├── autocomplete/
│   ├── buttons/
│   ├── context/
│   ├── modals/
│   └── select-menus/
├── structures/       # Base classes (Command, SlashCommand)
├── triggers/         # Message triggers
├── types/            # TypeScript type definitions
├── utils/            # Utilities (Loader, Paginator, embeds, etc.)
├── client.ts         # ExtendedClient & HerionClient
├── config.ts         # Bot configuration
└── startup.ts        # Entry point

🤝 Contributing

Want to help improve Herion?

  • Open a pull request for bug fixes, enhancements, or documentation.
  • Provide clear explanations and concise titles.
  • Be respectful and constructive in all discussions.

📄 License

This project is licensed under the MIT License.


Built with ❤️ by SamTheDevDE

About

a modern, extensible discord bot template written in typescript

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors