WORK IN PROGRESS
Zombie Alert is a Discord bot for the game 7 Days to Die that helps monitor and manage your dedicated game server.
It can read server logs, announce in-game events to Discord, and provide admin commands through chat.
If SERVERTOOLS are installed on the server, bot can utilize some of the SERVERTOOLS commands.
This bot currently is only tested on game server version A21, but in theory should work on latest game versions. When I can, I will to tests with the latest game version and make a note here.
- Reads server logs and posts updates to Discord
- Sends alerts about hordes, player deaths, logins, and more
- Custom commands for querying server status
- Lightweight and configurable
| Command | Description | Admin Only |
|---|---|---|
!backup |
Creates a backup of the current world (WORK IN PROGRESS) | ✔ |
!banlist |
Displays the list of banned players | |
!bloodmoon |
Shows when the next blood moon will occur and how much time is left | |
!playerban |
Bans a specified player from the server | ✔ |
!playerkick |
Kicks a player from the server | ✔ |
!players |
Lists players currently online | |
!players all |
Shows all registered players (online and offline) with extra details | |
!playerunban |
Removes a player from the ban list | ✔ |
!playerwhois |
Displays detailed info about a specific player (WORK IN PROGRESS) | ✔ |
!reboot |
Restarts the game server (WORK IN PROGRESS) | ✔ |
!saveworld |
Saves the current state of the world | ✔ |
!say |
Sends a message to the in-game chat | ✔ |
!serverstart |
Starts the server if it is offline (WORK IN PROGRESS) | ✔ |
!setchannel |
Sets the current Discord channel as the bot's output channel | ✔ |
!shutdown |
Shuts down the game server (WORK IN PROGRESS) | ✔ |
!status |
Displays the server's current status and autoshutdown info (if servertools mod installed and configured for autoshutdown) | |
!time |
Shows the current in-game time and date |
-
Create a Discord bot in Discrod
- Go to the Developer Portal
- Visit: https://discord.com/developers/applications
- Log in with your Discord account if needed.
- Create a New Application
- Click the "New Application" button (top right).
- Give your bot a name (this will be its display name).
- Click "Create".
- Create the Bot
- In the left sidebar, go to the “Bot” section.
- Click “Add Bot”, then “Yes, do it!” to confirm.
- (Optional) Set a profile picture or name for your bot.
- Get the Bot Token
- Still in the “Bot” section, click “Reset Token” or “Copy” under Token.
- Save the token somewhere safe – you’ll use it in your bot configuration.
⚠️ Never share it! It gives full control of your bot.
- Go to the Developer Portal
-
Install Python
- Download the latest version of Python 3.13+ from python.org
- Make sure to check ✅ "Add Python to PATH" during installation!
-
Clone or download this repository
git clone https://git.zodcode.tech/ZODCODE/7days-discord-bot.git
cd your-bot-repo -
Install required packages
WORK IN PROGRESS
-
Configure the bot
- Create
bot.envfile or copysample.bot.envfile tobot.env - Set your Discord bot token, log file path, and other settings
- Create
| ENV | Required | Description | Default value |
|---|---|---|---|
GAME |
Game server executable file | 7DaysToDieServer | |
GAME_PATH |
✔ | Location of your game installation | |
DATA_PATH |
✔ | Location, where your game data is stored, usually defined in serverconfig.xml as UserDataFolder and SaveGameFolder. | 7DaysToDieServer |
GAME_LOG |
Name for the game log files | output_log | |
BOT_LOG |
Name for the bot log files | zombie_alert | |
GAME_LOG_KEEP_COUNT |
How many game log files to keep | 20 | |
BOT_LOG_KEEP_COUNT |
How many bot log files to keep | 20 | |
GAME_MONITOR |
Defines if the bot should try to restart the sevrver if server is not running. 1 - run the server, 0 - just wait for the server to be started to other tools |
0 | |
SERVERTOOLS |
Defines if SERVERTOOLS mod is installed on the server. 1 - installed, 0 - no servertools |
0 | |
DISCORD_TOKEN |
✔ | Your discord bot token, you can generate one here | |
DISCORD_PREFIX |
Prefix for discord commands, like ! in !status |
! | |
DISCORD_CHANNEL |
Channel for the bot to output some server information, like server status or ingame chat. Can be set up after bot launch by using setchannel command |
||
TELNET_HOST |
Address for your game server telnet | 127.0.0.1 | |
BM_START_TIME |
Time of the day, when Bloodmoon STARTS on your server | 22:00 | |
BM_END_TIME |
Time of the day, when Bloodmoon ENDS on your server | 04:00 |
-
Run the bot
python 7daysbot.py
-
Add the bot to your server
- Go to the Developer Portal again
- Visit: https://discord.com/developers/applications
- Log in with your Discord account if needed.
- Go to the “OAuth2 > URL Generator”
- In the left sidebar, go to “OAuth2” > “URL Generator”.
- Generate an Invite Link
- Under Scopes, check: bot
- Under Bot Permissions, check what your bot will need: Send Messages, Embed Links, Read Message History, Mention Everyone.
- Copy the generated URL at the bottom.
- Invite the Bot to Your Server
- Paste the URL into your browser and choose a server you manage.
- Click “Authorize” and complete the CAPTCHA.
- Go to the Developer Portal again
-
Select channel for the bot notifications and ingame chat
When in the channel you want to have all the bot notifications and ingame chat, just use this command:
!setchannelOr enter your channel ID manually in the
bot.envfile asDISCORD_CHANNEL = YOUR_DISCORD_CHANNEL_ID
WORK IN PROGRESS
This product is licensed under the Apache License, Version 2.0.
ZOD Code Elecronics Copyright 2025, Val Comdriver