Changelog

Track every evolution of Valiente — features, fixes, and architectural improvements.

v3.1.0 May 24, 2026 Latest

Dashboard speed optimization, Database atomic concurrency fixes, and Music Player resilience against YouTube restrictions.

Performance & Architecture
  • Dashboard Instant LoadCompletely eliminated dashboard navigation latency. Serialized API settings prefetch and enforced strict client-side caching to prevent race conditions on session storage.
  • MongoDB Atomic OperationsOverhauled the Economy and Achievements engines to use atomic findOneAndUpdate($inc, $set) instead of document overwrites. Eliminates data conflicts during high traffic.
  • Read-Only OptimizationDeployed .lean() queries across all leaderboard, ranking, and shop endpoints to bypass Mongoose document hydration, significantly reducing RAM usage.
Bug Fixes
  • Music Player ResilienceImplemented trackError and trackStuck handlers for the Lavalink player. The bot now gracefully skips age-restricted or region-locked YouTube videos and notifies users instead of crashing silently.
  • Flush Conflict PreventionResolved a critical MongoDB conflict in the Achievements engine where daily resets collided with active message increments, ensuring perfectly accurate tracking across timezone resets.
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 AlertsAutomatic 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 ProtectionAll 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 RestoredThe accidental res.removeHeader("Content-Security-Policy") call has been removed. Helmet.js CSP is now properly enforced with explicit scriptSrcAttr and curated allow-lists.
  • Session HardeningSessions now store only the Discord user ID (not the full profile object). The public fallback secret 'valiente_super_secret_key' has been eliminated — SESSION_SECRET is now mandatory at startup.
  • CORS WhitelistThe API is no longer accessible from arbitrary origins. cors() now accepts only valientebot.xyz (configurable via env var).
  • AntiCrash DebounceThe WebhookClient is now a singleton. Identical errors repeated within 5 seconds are deduplicated to prevent Discord rate-limit abuse during error storms.
  • Cookie Securitycookie.secure set to true. Works correctly behind Cloudflare due to trust proxy: 1 already being configured.
Performance & Architecture
  • MongoDB Connection DeduplicatedThe ShardingManager in index.js no 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 /setlang command 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 IndexAdded compound index {Level: -1, XP: -1} on the levels collection, turning full collection scans into index-covered queries.
  • AuditLog ThrottleConcurrent 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 CleanupThe voiceJoinTimes Map is now purged hourly. Entries older than 24h (orphaned from disconnected clients) are removed automatically.
  • Cloudflared Auto-RestartThe Cloudflare tunnel process now restarts automatically on crash using exponential backoff (max 60s), replacing the previous silent failure.
Bug Fixes
  • Free Games DuplicatesA 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 RenderingFree Games end dates displayed as raw <t:unix:d> text instead of formatted dates. Backticks surrounding the timestamp were removed.
  • Excessive Integration LogsThe guildIntegrationsUpdate event (triggered on every slash command sync by any bot) was removed from the logger, eliminating log channel spam.
  • Achievement Descriptions MissingAchievement embeds now consistently display the translated description text (what to do to unlock the achievement), which was previously absent.
  • Dashboard Real-Time SyncThe 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 SyncFixed all sync issues between Website and Bot (Tickets, AutoMod, Birthdays). Data now saves correctly in the database.
  • Persistent NavigationThe dashboard now remembers the selected server after F5 using URL parameters.
  • Auto-Mod WebThe "Enable" toggle now saves correctly from the web interface.
Ticket System 2.0
  • Web DeploymentAdded a 🚀 "Deploy to Discord" button on the dashboard.
  • Multi-LanguageThe ticket panel automatically adapts to the server's configured language.
  • Full FlowCreate, close, reopen and delete tickets via interactive buttons.
v2.0.0 January 20, 2026
Foundation Release
  • Glassmorphism DashboardComplete visual overhaul of the web panel.
  • Reaction RolesNew interactive role assignment system via message reactions.
  • Language SelectorIntegrated flag picker for 10 languages directly in /setup.
  • ShardingManagerMigrated to Discord.js ShardingManager for horizontal scalability.
v1.5.0 December 10, 2025
Core Systems
  • Leveling & XPText and Voice XP system with configurable rates.
  • EconomyWork, Crime, Blackjack, Slots, Shop and Rob commands.
  • MusicPlay, Skip, Stop, Pause — powered by DisTube with Spotify/SoundCloud plugins.