Skip to content

Latest commit

 

History

History
117 lines (93 loc) · 3.78 KB

File metadata and controls

117 lines (93 loc) · 3.78 KB

@TypeScript DiscordBot Template

Last Commit TypeScript Languages License

Built with the tools and technologies:

JSON Markdown npm Prettier .ENV Nodemon TypeScript ts-node Discord ESLint


📌 Table of Contents


📖 Overview

Typescript-DiscordBot-Template provides a solid starting point for creating Discord bots with:

  • Clean, modular, and maintainable architecture
  • Slash command & event handling system
  • Integrated MySQL database support
  • Pre-configured tools for development and deployment

✨ Features

  • 🧩 Command & Event Templates – Rapidly create and organize bot features.
  • 🚀 Deployment Tools – Automatic slash command registration.
  • 🗃️ Database Integration – MySQL setup for persistent storage.
  • 🔍 Error Logging – Centralized error handling with detailed logs.
  • 🛡️ Permission Checks – Role-based access and command restrictions.
  • ⏱️ Cooldown System – Prevents command spam.
  • 🎯 Scalable Structure – Easy to expand and maintain over time.
  • 🧹 Code Quality Tools – ESLint, Prettier, and TypeScript strict mode.

📂 Project Structure

Typescript-DiscordBot-Template/
│
├── src/
│   ├── commands/        # Command files
│   ├── events/          # Event handlers
│   ├── config/          # Configurations (.env loading, constants)
│   ├── handlers/        # Handlers interacting with the bot (Command & Event Handler, Deploy Commands, GuildCommand Manager)
│   ├── services/        # Services Modules (Database MySQL Module)
│   ├── tools/           # Tools functions (Cooldown, Permission Handler, Error Handler)
│   ├── types/           # Interfaces for Commands & Events
│   └── index.ts         # Bot entry point
│
├── .env.example         # Environment variables template
├── package.json
├── tsconfig.json
└── README.md

🛠️ Getting Started

Prerequisites

  • Node.js v18+
  • npm (comes with Node.js)
  • TypeScript knowledge

Installation

# Clone the repository
git clone https://github.com/jmiccoDev/Typescript-DiscordBot-Template

# Move into the project directory
cd Typescript-DiscordBot-Template

# Install dependencies
npm install

Usage

# Development mode
npm run dev

# Build for production
npm run build

# Start production bot
npm start

📜 License

This project is licensed under the MIT License.