An open-source Discord bot for the Zombie Horde Minecraft server, built with a TypeScript + Discord.js + ExpressJS backend, React frontend, MongoDB database, and the Bun runtime.
Now powered by Elvenide's Brynjolf suite - a set of efficient, powerful, and adaptive systems for command creation, command handling, and event handling! Combined with TypeScript, this suite makes Discord bot creation easier and more powerful than ever before.
An advanced rank system that rewards users with XP when they send messages. Uses a cooldown system to ensure spamming is not rewarded. When users collect enough XP, they level up. A dynamic rank leaderboard webpage made with React allows users to see their standing in their Discord server, and compete with their fellow members for the top 3 spots on the leaderboard. XP is independently tracked monthly and all-time, allowing new members of a Discord server to still be able to compete with longtime veterans in the monthly rank leaderboards.
A live example of the Rank Leaderboards page can be found here.
A Discord category channel can be configured to contain two dynamic "stat" channels that show how many players are on the Minecraft server and whether the server is online, respectively. These stat channels automatically update every 6 minutes, allowing users to get mostly accurate information while avoiding Discord's rate limits.
An automated system that allows users to react to a Discord message to give themselves a Discord role, with no permissions necessary for normal users and a fairly simple setup process for admins.
An automated system that adds yes/no voting reactions to messages sent in suggestion channels that start with the term Suggestion:. This is a simpler alternative to Discord's native polls feature. Discord's polls require manually setting up yes/no options, while the Suggestion Votes system does it automatically. Discord's polls also expire after a maximum of 2 weeks, whereas the Suggestion Votes system allows users to vote indefinitely.
An automated system that adds a specific role to a user when they accept the Discord rules popup (you must configure this in Server Settings >> Safety Setup >> DM and Spam Protection >> Members must accept rules). This can be used to easily hide content from members that refuse to agree to your rules, or to only show content to those who do accept the rules.
- Docker
- Download and install Docker Desktop to easily and securely run the bot with just one command
- Bun
- Download and install Bun
- MongoDB
- Create a MongoDB database, and write down the connection URL
- Create user credentials for your database, and write down the username and password
- Discord Bot User
- Create a Discord bot user, and write down the bot token and application ID
- Discord Server
- Invite the bot to your server or a test server
- Minecraft Server (optional)
- If using this bot for a Minecraft server, write down the server's IP address
- Go to
src/systems/stats.tsand replace all references toZombiehorde.netwith your server's IP address- This will be configurable in .env in the future, but for now is hard-coded -- sorry!
- Clone this repository
- Rename
sample.envto.env - Fill out the
.envfile with your info from the prerequisites (such as bot token and MongoDB credentials) - Run
docker compose upin thejaybotfolder to start the bot
- Add a
-dflag at the end to run the bot in detached mode without seeing the logs
Note: Trying to run the bot directly using
npm(orbun) scripts instead ofdocker composemight cause MongoDB errors if you are on Windows, due to weird issues in Bun/Node/MongoDB. Running it in Docker avoids the issue, since it uses a Linux environment.
- If you only make changes to the code:
- Simply run
docker compose upagain to run the bot with your new changes
- Simply run
- If you change/add/remove dependencies:
- You'll need to rebuild the container by running
docker compose up --build
- You'll need to rebuild the container by running
To stop the bot, run docker compose down (if in detached mode) or press Ctrl+C in the terminal (if not in detached mode).
- Switched to Bun runtime, leading to much faster building, installation, and development
- Discord bot backend now runs on Bun
- React frontend is now built/bundled by Bun
- Updated and simplified dependencies
- Replaced several dependencies (e.g.
react-scriptsandtsx) with Bun
- Replaced several dependencies (e.g.
- Integrated this repo with ElvenOps (my self-hosted CI/CD system) for continuous deployment on push to main branch
- Simplified and improved Docker containerization by -- surprise, surprise -- using Bun
- Switched from older
docker-composeto moderndocker composecommands - Updated logos in React frontend
- Fixed monthly ranks not resetting
- Replaced hard-coded references to server-specific emojis with general emojis
- Prevented Discord's system messages from acting as suggestion messages
- Removed rank-clearing command to prevent abuse
- Made running on Docker much simpler
- Added documentation for running the bot yourself
- Added these changelogs
- Added support for Minecraft server stats
- Added support for rule roles
- Added support for suggestion votes
- Added support for reaction roles
- Added support for rank cards
- Added support for monthly rank cards
- Added support for rank leaderboards
- Added support for stat channels
- Added support for rule roles
- Added support for suggestion votes
- Added support for reaction roles
- Added support for rank cards
- Added support for monthly rank cards
- Added support for rank leaderboards
- Added support for stat channels





