A feature-rich Discord bot designed for DayZ server management with deep Nitrado integration. Includes log tracking, PvP stats, player interaction alerts, full stats tracking, and heatmap visualization.
- Continuously polls DayZ ADM logs to track PvP kills, suicides, fall deaths, explosions, animal attacks, etc.
- Sends clean, embed-rich updates to individual log channels.
- Displays kills with full details: weapon, distance, location, and embedded kill/death statistics.
- Tracks K/D ratio, streaks, time alive, and player rank.
- Automatically or manually generate heatmaps showing player hotspots.
- Use
/generateallheatmapto output an image per-server.
### 🔐 Device ID Ban Management (To be implemented)
- Commands like
/bandeviceand/unbandeviceare prepared for future admin-level banning by device ID.
- Assign different logs to specific channels using
/logconfig. - Logs supported: deaths, kills, suicides, hits, flag interactions, fall deaths, etc.
- Create flag zones using
/addarea. - Automatically detect and log flag raising/lowering in critical map zones.
- Use
/generatekeysto create codes for rewards or roles. - Users redeem via
/redeem, and all redemptions are logged for audit.
- Players link their in-game name via
/link. - Use
/statsor/stats [username]to show personal or public stats.
/link– Connect Discord user to a character name/stats [user]– Pulls stats: K/D, time alive, streaks, etc./nitradoserver– Add/remove Nitrado server by ID/logconfig– Assign log output categories to Discord channelsWork in progress/addkit/modifykit– Create and edit predefined loot kits/generatekeys– Generate codes in bulk/redeem– Players use this to claim codes/sync– Resync slash commands (if required)
Classic prefix command available for sync:
<PREFIX>sync
- Clone the repo.
- Edit
config.pywith your Nitrado token, Discord bot token, and channel mappings. - Install dependencies:
pip install -r requirements.txt
- Run the bot:
python bot.py
Edit config.py and fill in these fields:
class Config:
NITRADO_TOKEN = "" # Your Nitrado API token
DISCORD_TOKEN = "" # Your Discord bot token
BOT_PREFIX = "." # Prefix for non-slash fallback commands
EMBED_IMAGE = "" # Optional thumbnail for embeds
EMBED_FOOTER = "Your Server Name" # Displayed at bottom of all embeds
EMBED_FOOTER_IMAGE = "" # Footer icon URL
EMBED_COLOR = '' # Hex color for embeds, e.g., 0xE40000Make sure all tokens are valid and quotes are used properly.
Use the provided requirements.txt to install everything:
pip install -r requirements.txtpython bot.pyAfter the bot is online:
Use:
/nitradoserver
-
Input your Nitrado server ID
-
Choose action:
Add -
The bot will then create a database entry for the configuration of your server.
Note: You can always run the command /serverlist to view your Nitrado servers, and their associated ID to get the correct ID needed
Use:
/logconfig
- Assign log types (
death,kill,hit,flag,onlinecount, etc.) to Discord channels. - Each log type will automatically route messages to the configured location, or behave accordingly
| File | Purpose |
|---|---|
stats.db |
Player stats (kills, deaths, streaks, time) |
region.db |
Flag detection zones |
servers.db |
Tracks registered servers |
deviceidban.db |
Future support for banning players |
codes.db |
Redeemable key storage |
activitydata.db |
Heatmap, kill/death tracking |
Important: Make sure your bot is set to private in the Discord Developer Portal.
If your bot is public (bot_public == True), it may be exploited by unauthorized users to access admin-level commands. The bot includes a safety check:
async def on_ready():
print("Bot Ready")
s = await bot.application_info()
if s.bot_public == True:
print("""
ERROR: SECURITY WARNING
Bot is public, this is a security risk as commands are only restricted to members who have admin access.
If unauthorized persons add the bot to their server, they may gain access to sensitive admin commands.
Set the bot to **private** in the Discord Developer Portal under "Bot Settings".
If you need help, contact b0nggo.
Application closing automatically.
""")
exit()