Nemesis
Nemesis is a modern Discord bot template designed to streamline bot development with best practices, advanced infrastructure, and seamless deployment. Built with Node.js 24, Discord.js, and PNPM 10, it includes CI/CD workflows, and Pterodactyl integration for easy hosting.
Install / Use
/learn @enum314/NemesisREADME
Nemesis
A modern Discord bot template that can also be used as a foundation for any Node.js application. This template is designed to jumpstart your development with best practices and ready-to-use infrastructure.
🚀 About This Template
This is a template repository that provides a solid foundation for building modern Discord bots and Node.js applications. It's designed to be forked or used as a starting point for new projects, saving you hours of initial setup and configuration.
The template offers:
- Ready-to-use infrastructure with CI/CD workflows and deployment scripts
- Modern tech stack with Node.js 24 and PNPM 10
- Development best practices baked in from the start
- Production-ready configuration for immediate deployment
- Pterodactyl integration for easy hosting on game server panels
- Clean imports using Node.js subpath imports to avoid relative path hell
📋 Prerequisites
🛠️ Getting Started
Using This Template
-
Create a new repository from this template:
- Click the green "Use this template" button at the top of the GitHub repository page
- Select "Create a new repository"
- Name your new project and configure repository settings
- Click "Create repository from template"
-
Clone your new repository:
# Clone your newly created repository (replace with your username/repo)
git clone https://github.com/your-username/your-new-repo.git
cd your-new-repo
# Customize for your project
# - Update package.json with your project details
# - Modify .env.example for your environment variables
# - Update this README!
# Install dependencies
pnpm install
# Start development server
pnpm dev
Local Development
# Install dependencies
pnpm install
# Start development environment
pnpm dev
🚢 Deployment Options
Pterodactyl Panel Deployment
The template includes Pterodactyl egg files for deployment on Pterodactyl game server panels. This is the recommended deployment method for this template:
egg-nemesis.json- JSON format egg for Pterodactyl
How to Use the Pterodactyl Egg:
-
Import to Pterodactyl Panel:
- Log in to your Pterodactyl admin panel
- Go to Nests > Import Egg
- Upload the
egg-nemesis.jsonfile
-
Create a New Server:
- In the Pterodactyl admin panel, create a new server
- Select the Nemesis egg from the list
- Configure server settings including port allocations and resources
-
Configurable Options:
- Startup Command: Customize how the application starts (default:
node .) - GitHub Repository Settings:
- GitHub Username: Username of the repository owner
- GitHub Repository: Name of the repository to clone
- GitHub Tag: Release tag to deploy (use 'latest' for most recent)
- GitHub Personal Access Token: For private repositories (optional)
- Startup Command: Customize how the application starts (default:
-
After Installation:
- The server will automatically install your project from the specified GitHub repository
Installation Script
The installation script uses environment variables set in the Pterodactyl egg:
GITHUB_USERNAME- GitHub username for the repositoryGITHUB_REPOSITORY- Name of the repositoryGITHUB_TAG- Release tag to fetch (default: latest)GITHUB_TOKEN- Optional token for private repositories
-
Environment Setup:
- Updates package lists and installs Node.js 22.x
- Installs required dependencies (curl, wget, tar, jq, etc.)
- Installs PNPM and configures its package store
-
Configuration:
- Sets variables based on Pterodactyl egg inputs (
GITHUB_USERNAME,GITHUB_REPOSITORY, etc.) - Handles defaults for missing values (e.g., username defaults to "enum314")
- Sets variables based on Pterodactyl egg inputs (
-
Release Download:
- Determines the GitHub release URL based on the specified tag
- Supports two download paths:
- Private repositories: Uses GitHub API with token authentication
- Public repositories: Uses direct GitHub release download URLs
- Downloads both the application archive (
bot.tar.gz) and checksum file
-
Security Verification:
- Calculates SHA-256 checksum of the downloaded archive
- Compares against the expected checksum file
- Aborts installation if verification fails, protecting against corrupted or tampered files
-
Installation:
- Extracts the application to the server directory
- Installs production dependencies using PNPM
- Runs database migrations via Prisma
This automated process ensures consistent, secure deployments with minimal manual intervention.
🏗️ Template Structure
nemesis/
├── .github/workflows/ # GitHub Actions CI/CD configurations
├── .vscode/ # VSCode Settings
├── assets/ # Assets folder
├── configs/ # Configurations Directory
├── docs/ # Documentation
├── prisma/ # Prisma Schema and Migrations
├── src/ # Application source code
├── .env.example # Example environment variables
├── egg-nemesis.json # Pterodactyl egg (JSON format)
├── eslint.config.js # ESLint Configuration
├── LICENSE # License
├── package.json # Project metadata and scripts
├── pnpm-lock.yaml # Lock file for dependencies
├── prisma.config.ts # Prisma Configuratioon File
└── tsconfig.json # TypeScript configuration
📝 Available Scripts
pnpm build- Build for productionpnpm start- Start production serverpnpm dev- Run development serverpnpm lint- Check for code style issuespnpm format- Format codepnpm v:patch- Version bump patch (0.0.x)pnpm v:minor- Version bump minor (0.x.0)pnpm v:major- Version bump major (x.0.0)
🚢 CI/CD
The template includes GitHub workflows for:
- PR Staging: Runs on pull requests to the main branch. Performs lint checks and runs tests to ensure code quality before merging.
- Staging: Runs on pushes to the main branch. Performs lint checks and tests similar to PR Staging.
- Release: Triggered when a version tag (v*.*.*) is pushed. Builds the project, creates a bot archive (bot.tar.gz), generates checksums, and publishes a GitHub release. Also maintains a 'latest' tag for easy reference.
Each workflow can be customized with commit messages:
- Use
[skip lint]to skip linting checks - Use
[skip test]to skip tests
Note: Workflows automatically skip certain paths like documentation, configuration files, and development tools.
🧪 Testing
# Run tests
pnpm test
# Run linting
pnpm lint
📄 License
This template is licensed under the MIT License - see the LICENSE file for details.
👥 Customizing This Template
- Replace this README with information specific to your project
- Update package.json with your project details
- Update environment variables in .env.example
- Add your application code to the src directory
🤖 Discord Bot Features
If you're looking to use this template for a Discord bot, please see DISCORD.md for specific Discord.js integration features and configuration.
Related Skills
node-connect
341.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
prose
341.2kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
frontend-design
84.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
sonoscli
341.2kControl Sonos speakers (discover/status/play/volume/group).
