Skip to content

joopdev/discord-bot-egg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Discord Bot Egg (Node.js 18-25)

A specialized Pterodactyl Egg for Node.js Discord bots, optimized for fast deployments, automatic dependency installation, and flexible package manager detection.

🧐 The Problem & Solution

The Problem:
Many standard Node.js eggs are too generic for Discord bots. This often leads to issues with dependency installation, lockfiles, or manually switching between npm, yarn, and pnpm.

The Solution:
This egg is specifically tuned for Discord bots and automatically selects the right package manager. It also installs dependencies intelligently at startup (based on AUTO_UPDATE or a missing node_modules folder), so your bot starts faster and more reliably.

🧩 Supported Versions

This egg supports the official Parkervcp/Yolks Node.js Docker images:

  • Node.js 18
  • Node.js 19
  • Node.js 20
  • Node.js 21
  • Node.js 22
  • Node.js 23
  • Node.js 24
  • Node.js 25

✨ Features

  • Optimized for Discord bot workloads
  • Supports npm, yarn, pnpm, and auto detection
  • Automatic dependency installation on startup
  • Lockfile-aware preference (pnpm-lock.yaml, yarn.lock, otherwise npm)
  • Flexible entrypoint via MAIN_FILE
  • Optional BOT_TOKEN variable to keep secrets out of your codebase

πŸ”§ Recommended Variables

Variable Recommended value Explanation
MAIN_FILE index.js Main file executed by Node.
PACKAGE_MANAGER auto Lets the egg decide whether to use npm, yarn, or pnpm.
AUTO_UPDATE 1 Installs/refreshes dependencies on startup or when node_modules is missing.
BOT_TOKEN (your token) Helps keep your Discord token outside your source code. Use it in your bot through process.env.BOT_TOKEN.

πŸ“₯ Installation Guide

  1. Open your Pterodactyl Admin Panel.
  2. Go to Nests and choose your preferred nest (or create a new one).
  3. Import the egg.json from this Discord Bot Egg.
  4. Create a new server using this egg.
  5. Upload your bot files (package.json, bot code, and lockfile if available).
  6. Configure variables:
  • MAIN_FILE (for example index.js or src/bot.js)
  • PACKAGE_MANAGER set to auto (recommended)
  • AUTO_UPDATE set to 1
  • BOT_TOKEN with your real Discord token
  1. Start de server.

πŸ› οΈ Troubleshooting

  • Bot does not start / main file not found
    Make sure MAIN_FILE exactly matches your file name and path.

  • Dependencies are not being installed
    Set AUTO_UPDATE to 1 or true, or remove node_modules and restart.

  • Wrong package manager selected
    Manually set PACKAGE_MANAGER to npm, yarn, or pnpm.

  • Token issues / invalid token
    Check your BOT_TOKEN variable and confirm your code uses process.env.BOT_TOKEN.

β˜• Support My Work

Author: JoopDev (AKA. Vdbergjohannes)

About

A specialized, auto-updating Pterodactyl Egg optimized for hosting Node.js Discord bots.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors