A feature-rich Discord bot for Valheim PvP communities. Tracks kills, announces streaks with sound effects, manages roles, and provides rich player statistics.
⚠️ Requires integration with KillFeed messages from the Valheim PvP Tweaks mod (e.g., "Player A killed by Player B"). Killfeed must be forwarded to a dedicated text channel via webhook.
- 🎉 Events: Separate events across different Discord channels with dedicated player statistics for each event
- ✅ Automatic kill tracking and multi-kill recognition
- 🔥 Killstreaks + deathless streaks with voice + embed alerts
- 💀 Streak break detection (embed + dynamic
obezhiren.wavsound) - 🔊 Voice announcements with dynamic sound queueing
- 🖼️ Rich embeds with avatars, role-colored names, emojis
- 📊 Player stats:
/top,/mystats,/stats,/topmmr - 📈 Matchmaking rating (MMR) system with rating deviation (RD) and volatility
- 🧮 Manual and historical rating adjustment via
/mmr,/mmrsync,/mmrlog - 👑 Role assignment based on MMR or kill count
- ✍️ Fully configurable role thresholds via
/roleset,/mmrroleset - 🛠 Admin commands for linking, resetting, adjusting
- 💾 Lightweight SQLite backend
- 🧱 Self-contained build via Nuitka (
main.exe)
This bot uses an advanced matchmaking rating system based on Glicko-2 principles, including:
- Automatic updates after each frag
- Rating deviation and volatility per player
- Event-specific statistics: Stats are tracked separately for each event. Use the event name when requesting stats (e.g.,
/stats <event>). If no event is specified, stats for the main event are returned. - Manual rating adjustments:
/mmr - Full history replay and resync:
/mmrsync - Role assignment based on rating:
/mmrroles,/mmrroleupdate - Transparent rating history:
/mmrlog
Two parallel systems are supported:
- Assign roles based on rating thresholds for the main event only. Other events do not support role assignment.
- Commands:
/mmrroleset,/mmrroleupdate,/mmrroles,/mmrroleclear
- Based on total frags + manual bonus points for the main event only.
- Manual control:
/roleset,/roleupdate,/roles,/roleclear
- Create your bot on Discord Developers
- Save the token in a
.envfile:DISCORD_TOKEN=your_token_here
- Save the token in a
- Prepare database
- Starting from v8.0.0, it is strongly recommended to create a new
frags.dbdatabase, as migrating an older database is complex and may lead to errors. If you choose to migrate, make a backup first. - A new
frags.dbwill be created automatically if missing. - Alternatively, place your own copy in the project root.
- Starting from v8.0.0, it is strongly recommended to create a new
- Add sound effects
- WAV files (
48kHz PCM stereo) go in the/soundsfolder. - Required filenames:
doublekill.wav, triplekill.wav, ultrakill.wav, rampage.wav, silent.wav, obezhiren.wav
- WAV files (
- Run the bot
- Execute:
main.exe(after build)
- Execute:
- Python 3.13.5
- Nuitka 2.7+
opus.dll(already included)- Microsoft Visual Studio Build Tools (C/C++ compiler)
- PyNaCl (for voice playback)
Use build.bat to create a standalone executable (main.exe):
- Compiles all source files
- Includes
/sounds/andopus.dll - Excludes sensitive files (
.env,frags.db)
After build:
- Manually copy:
.envfrags.db(optional — will be auto-created)
- Launch:
main.exe
- Core Development: @ksn
- Coordination: @Gurney, @Gloom
- Engineering Support: ChatGPT, Grok, Cursor 🤖