Changelog
Track every evolution of Valiente — features, fixes, and architectural improvements.
v3.1.0
May 24, 2026
Latest
Major speed improvements for the dashboard, better database stability, and a more resilient music player.
Performance & Architecture
- Dashboard Instant Load — Completely eliminated dashboard navigation latency. The website now loads instantly thanks to a better caching system.
- Database Stability — Improved how the bot saves Economy and Achievements data. This prevents data loss and conflicts during high traffic.
- Memory Optimization — Optimized data reading for leaderboards and the shop. The bot now consumes significantly less server memory.
Bug Fixes
- Music Player Stability — The bot now gracefully skips age-restricted or region-locked YouTube videos and notifies users instead of failing silently.
- Achievements Tracking — Fixed a bug in the Achievements system to ensure perfectly accurate tracking when daily stats reset.
v3.0.0
March 12, 2026
Major security hardening, performance overhaul and real-time dashboard. This release closes all known security gaps and introduces SSE-based live sync between the bot and the web panel.
New Major Features
- Achievement System (90 Successes) — Full system with 9 categories (Messages, Voice, Reactions, Economy, Commands, Voting, Invites, Longevity, Prestige) × 10 progressive tiers. Batch-write engine with 30s cooldown prevents DB overload. Each achievement awards XP & Coins automatically.
- Real-Time Dashboard (SSE) — Configuration changes made via Discord commands are now reflected instantly on the web panel via Server-Sent Events — no page refresh required.
- Free Games Alerts — Automatic detection and announcement of free games on Epic Games Store, Steam and GOG. Duplicate prevention migrated to MongoDB for reliability across restarts.
- Vote Streaks & Reminders (VIP) — Top.gg, Discord Bot List and DiscordThings webhooks now track consecutive voting days. VIP users receive a private reminder 12 hours after each vote.
Security Improvements
- XSS Protection — All Discord user/server names inserted into innerHTML are now passed through a strict
escapeHtml()sanitizer, preventing Cross-Site Scripting attacks via crafted Discord account names. - CSP Fully Restored — The accidental
res.removeHeader("Content-Security-Policy")call has been removed. Helmet.js CSP is now properly enforced with explicitscriptSrcAttrand curated allow-lists. - Session Hardening — Sessions now store only the Discord user ID (not the full profile object). The public fallback secret
'valiente_super_secret_key'has been eliminated —SESSION_SECRETis now mandatory at startup. - CORS Whitelist — The API is no longer accessible from arbitrary origins.
cors()now accepts onlyvalientebot.xyz(configurable via env var). - AntiCrash Debounce — The WebhookClient is now a singleton. Identical errors repeated within 5 seconds are deduplicated to prevent Discord rate-limit abuse during error storms.
- Cookie Security —
cookie.secureset totrue. Works correctly behind Cloudflare due totrust proxy: 1already being configured.
Performance & Architecture
- MongoDB Connection Deduplicated — The ShardingManager in
index.jsno longer opens its own MongoDB connection. Only the bot shard process connects, eliminating N+1 simultaneous connections against Atlas. - i18n Cache TTL (5 min) — The language cache now expires after 5 minutes. A
/setlangcommand change on Discord is automatically reflected without a bot restart. - Prefix Cache (60s) — The guild prefix is now cached per-guild for 60 seconds. Previously, a database round-trip was triggered on every single message.
- Leaderboard User Cache (30 min) — Discord user metadata (username, avatar) is cached individually for 30 minutes. Cold-cache leaderboard builds went from 100 sequential HTTP calls to a parallelized, cache-first lookup.
- MongoDB Leaderboard Index — Added compound index
{Level: -1, XP: -1}on the levels collection, turning full collection scans into index-covered queries. - AuditLog Throttle — Concurrent
fetchAuditLogs()calls for the same (guild, event type) pair are now coalesced. Previously, a bulk message delete could open 50 simultaneous Discord API calls. - VoiceJoin Memory Cleanup — The
voiceJoinTimesMap is now purged hourly. Entries older than 24h (orphaned from disconnected clients) are removed automatically. - Cloudflared Auto-Restart — The Cloudflare tunnel process now restarts automatically on crash using exponential backoff (max 60s), replacing the previous silent failure.
Bug Fixes
- Free Games Duplicates — A race condition during rapid bot restarts caused the same game to be announced multiple times. Fixed with an execution lock (
_running) and MongoDB-persisted sent-games cache. - Discord Timestamps Rendering — Free Games end dates displayed as raw
<t:unix:d>text instead of formatted dates. Backticks surrounding the timestamp were removed. - Excessive Integration Logs — The
guildIntegrationsUpdateevent (triggered on every slash command sync by any bot) was removed from the logger, eliminating log channel spam. - Achievement Descriptions Missing — Achievement embeds now consistently display the translated description text (what to do to unlock the achievement), which was previously absent.
- Dashboard Real-Time Sync — The Achievements panel in the dashboard now performs a live fetch before rendering, ensuring it always reflects the database state rather than a stale in-memory snapshot.
v2.1.0
February 4, 2026
Dashboard & Synchronization
- Smart Sync — Fixed all sync issues between Website and Bot (Tickets, AutoMod, Birthdays). Data now saves correctly in the database.
- Persistent Navigation — The dashboard now remembers the selected server after F5 using URL parameters.
- Auto-Mod Web — The "Enable" toggle now saves correctly from the web interface.
Ticket System 2.0
- Web Deployment — Added a 🚀 "Deploy to Discord" button on the dashboard.
- Multi-Language — The ticket panel automatically adapts to the server's configured language.
- Full Flow — Create, close, reopen and delete tickets via interactive buttons.
v2.0.0
January 20, 2026
Foundation Release
- Glassmorphism Dashboard — Complete visual overhaul of the web panel.
- Reaction Roles — New interactive role assignment system via message reactions.
- Language Selector — Integrated flag picker for 10 languages directly in /setup.
- ShardingManager — Migrated to Discord.js ShardingManager for horizontal scalability.
v1.5.0
December 10, 2025
Core Systems
- Leveling & XP — Text and Voice XP system with configurable rates.
- Economy — Work, Crime, Blackjack, Slots, Shop and Rob commands.
- Music — Play, Skip, Stop, Pause — powered by DisTube with Spotify/SoundCloud plugins.