Release Notes

โœจ CoinForge Changelog

All updates and improvements to the bot.

โญ v2.3.0 v2.2.0 v2.1.0 v2.0.0 v1.6.0 v1.5.0 v1.4.3 v1.4.1 v1.4.0 v1.3.0 v1.1.0 v1.0.0 v0.6.2 v0.6.1 v0.6.0 v0.5.0

v2.3.0

July 29, 2026
LATEST

๐ŸŽฐ Gambling Balance Fix

  • Bet (/bet) exploit fixed: lose-half changed to lose-full. Previously had +25% expected value per round โ€” infinite money generator removed
  • Slots payout rebalanced: 2-match multiplier reduced from 2x to 1.5x. Game now has a proper 8% house edge instead of +16% player edge
  • Global max bet cap of 1,000,000 coins enforced server-side on all gambling commands (gamble, coinflip, slots, dice, bet, duel, blackjack)
  • Prefix commands now respect the max bet cap (previously only Discord slash-command options had a client-side limit of 1 trillion)

๐ŸŒ Website Bug Fixes

  • Status page 'Most Used Commands' now renders โ€” fixed block-scoped const bug that silently threw ReferenceError on every refresh
  • FAQ search filter now hides category headings when all items filtered (was using closest('h3') instead of previousElementSibling)
  • Admin feedback page now requires authentication (owner ID or API key) instead of being publicly accessible
  • Top.gg webhook body parsing fixed for Buffer payloads from express.raw() middleware
  • Missing CSS variables --accent and --glass added to root stylesheet
  • Health check endpoint moved before rate limiter so monitoring tools aren't blocked
  • EADDRINUSE retry loop now capped at 5 attempts instead of retrying forever

๐Ÿ”ง Bug Fixes

  • Claim interest messageBonus now correctly routes through the premium check branch
  • Delete clan logs activity before deleting instead of after (was logging into deleted clan)
  • Create clan now locks membership check inside the same transaction as creation
  • first_coin achievement now checks balance delta correctly instead of one-off threshold
  • setPremium uses greatest() to extend premium_until only forward (never shortens)
  • Prefix command handler reuses cached settings for maintenance mode check instead of fresh DB read
  • parseDurationPref returns null instead of throwing on invalid duration input
  • Remind command handles null guild gracefully for DMs

v2.2.0

July 24, 2026
STABLE

๐Ÿ“– Website Overhaul

  • FAQ page completely rewritten with 27 questions across 7 categories and live search
  • Support page expanded with quick start guide, common issues troubleshooting, and resource links
  • Docs page expanded with 22 sections including Cooldowns, Crime & Heists, Chat Rewards, Tips & Best Practices, Admin Commands

โฐ Reminders System

  • New /remind command โ€” set one-time reminders with natural duration parsing (m/h/d/w/mo/y)
  • New /reminders command โ€” view all active reminders with remaining time
  • Background polling every 30 seconds to fire due reminders via DM
  • New Reminder database table with automatic cleanup of expired entries

๐Ÿ’ก Command Improvements

  • /hourly now shows nextAvailableAt field and special event drops
  • /rank shows wallet, bank, net worth, and level breakdown
  • /shop accepts a page option for browsing large inventories
  • /sell shows remaining inventory quantity in the response
  • /fish displays player Level field
  • /interest shows nextAvailableAt field
  • Deposit and withdraw commands now use unified coin emojis

๐Ÿ”„ Consistency & Polish

  • All embed emojis unified across every command (no more mixed icon sets)
  • Hardcoded website URLs replaced with proper config-driven references
  • Event info (name, multiplier, drops) now displayed on all eligible commands consistently
  • Prefix command docs output now matches slash command docs output
  • Wiki references updated to point to /docs instead of external wiki

๐Ÿ”ง Bug Fixes

  • Fixed emoji parsing in text-based commands
  • Fixed inconsistent embed colors across similar command groups
  • Fixed interest command not showing accurate next available time
  • Fixed quest expiry bug โ€” new quests now expire at next midnight instead of current midnight

โšก Performance & Delay Reduction

  • In-memory cooldown cache avoids DB round-trip for every command (checks cache first, falls back to DB)
  • getActiveGlobalEvent() now cached with 30-second TTL โ€” called by nearly every earning command
  • getPremiumStatus() now cached with 60-second TTL per user
  • Added missing DB indexes: transactions (user_id, type), clan_members (user_id), feedback (guild_id), clan_log (clan_name), market_listings (seller_user_id)
  • Dead code cleaned up: fishCatches constant, makePaginationRow imports, baseEmbedWithAuthor function

v2.1.0

July 22, 2026
STABLE

๐Ÿ”’ Security

  • SQL injection vulnerability fixed in getUserRank and top leaderboard queries (CASE WHEN parameterized binding)
  • Timing-safe HMAC comparison for top.gg webhook signature verification
  • API endpoint /api/economy/:guildId now requires x-api-key header
  • Config crashes on missing BOT_OWNER_ID instead of silently defaulting to a hardcoded ID
  • All owner ID references moved from hardcoded values to environment variable

โšก Race Condition Fixes

  • Cooldowns for work, beg, crime, fish now set after payouts (previously set before, risking locked cooldown on crash)
  • Rob and heist cooldowns moved inside database transactions (roll back on failure)
  • Clan deposit wrapped in proper BEGIN/COMMIT/ROLLBACK transaction
  • Duel refund asymmetry fixed โ€” both challenger AND opponent refunded on game failure
  • Blackjack wager deducted after game state initialization (not before)

๐Ÿ“ป Changelog Webhook

  • No longer sends all 7 changelog entries on every restart
  • Tracks last sent version in new app_meta DB table, only sends entries newer than it
  • First deploy sends full history once, subsequent deploys only send new entries

๐Ÿงน Code Cleanup

  • Removed empty barrel files (prefix/index.ts, slash/index.ts)
  • Removed dead code: orphan exports in economy/constants, unused replyError helper
  • Embed builder footer/timestamp extraction โ€” 5 functions now share a stamp() helper
  • Removed 'cf' alias from coinflip prefix command (conflicted with default bot prefix)
  • Express raw body parser restricted to application/json for webhook endpoint

๐Ÿ”ง Bug Fixes

  • Empty catch blocks in API now log errors instead of silently swallowing
  • getUserRank and top now use parameterized queries instead of string interpolation

v2.0.0

July 21, 2026
STABLE

๐Ÿงน Memory Leak Fixes

  • Added 5-minute TTL auto-cleanup for pagination store entries (pagination entries no longer grow unbounded)
  • Periodic eviction for settingsCache, messageCooldowns, commandRateLimits, prefixCache, and voteCooldowns
  • Removed 2-minute full clear of dedup sets โ€” now uses timestamp-based eviction with 30-minute TTL
  • Dedup sets changed from Set to Map<string, number> for precise expiry-based cleanup

๐Ÿ›ก๏ธ Crash Resilience

  • All button interactions now wrapped in try/catch with proper error logging
  • Autocomplete handler wrapped in try/catch to prevent unhandled rejections
  • HTTP server now handles EADDRINUSE with automatic 5-second retry
  • Shutdown handler has 15-second forced exit timeout to prevent hanging
  • Webhook sender handles rate limits (429) with automatic retry and 5-second cooldown

๐Ÿ’ฌ Duplicate Message Prevention

  • Button router no longer intercepts vote/server-list/collector buttons (they were incorrectly routed to blackjack handler)
  • checkAndIncrementQuest wrapped in try/catch to prevent post-reply errors from causing double message.reply
  • 30-minute dedup TTL ensures Discord reconnect replays are properly filtered

๐Ÿ† Quest & Achievement Parity

  • Prefix commands (work, beg, crime, fish, gamble, coinflip, slots, dice, bet) now track quests matching slash variants
  • Achievements added to prefix: worker, beggar, criminal, fisher, gambler, high_roller, banker, shopaholic, rich_uncle
  • Prefix weekly now uses actualAmount (includes event multiplier) and displays event info
  • Prefix hourly now shows nextAvailableAt field and event info
  • Prefix duel checks opponent balance before accepting
  • Prefix buy itemKey now normalized with toLowerCase()

๐Ÿ“ป Top.gg Vote & Webhooks

  • Top.gg webhook now correctly distributes vote rewards (500 coins + vote token) โ€” was previously dead code
  • Changelog webhooks only fire on startup โ€” no longer re-sent every 6 hours in the status interval
  • Webhook functions consolidated with rate-limit handling and automatic retry on 429
  • Status webhook now includes complete server stats with proper error fallbacks

๐Ÿ”ง Command & Data Fixes

  • /exportdata crash fixed โ€” removed dropped guild_id column from query
  • createClan wrapped in transaction (was creating orphaned rows on partial failure)
  • transfer now creates two-sided transaction history (recipients see incoming transfers)
  • admin resetwealth parameter renamed from max_wealth to min_wealth to match actual >= SQL behavior
  • Global event duration validation โ€” invalid durations now show clear error instead of creating permanent event
  • statusApi endpoint won't hang โ€” all async calls now wrapped in try/catch
  • getPremium called once in buyItem instead of twice (one DB round-trip saved)
  • first_coin achievement logic simplified โ€” no NaN risk from string/number coercion
  • useItem default case refund wrapped in try/catch (item no longer permanently lost if addItem fails)
  • economyApi endpoint provides accurate data shape matching guildId parameter

v1.6.0

July 2026
STABLE

๐Ÿ† Achievements Display

  • /profile now shows achievement progress
  • /leaderboard has an achievement category to rank by unlocks

๐Ÿฐ Premium Server Grants

  • Server-wide premium can be granted through giveaways, promotions, testing, or community rewards
  • Premium servers let members use premium perks while they interact with CoinForge in that server
  • Owner command: /admin serverpremium

๐ŸŒ Global Events

  • Events are now global across all servers with custom names, durations, drop items, and rates
  • Boosted XP, coins, and fishing rates

๐Ÿ”ง Bug Fixes

  • Quest tracking fixed (mine, fish, hunt, chop, craft)
  • Shop parser handles multi-word items. Event badge/expiry logic corrected
  • Blackjack push tie result, warning system, fun commands, vouch system, prefix reset, fish rarity colors all fixed

v1.5.0

July 2026

โญ More Premium Perks

  • 2x weekly rewards, 1.5x XP multiplier, daily streak freeze
  • 3 exclusive premium-only shop items: Golden Watch, Diamond Ring, Premium Crate

๐Ÿ† Achievements

  • 16 achievements to unlock across all activities
  • Use /achievements to view progress

v1.4.3

July 2026

โฑ๏ธ Gambling Cooldowns

  • Added cooldowns to all gambling commands to fix exploit spam
  • Premium users enjoy half the cooldown duration

๐Ÿ›๏ธ Premium Shop Discount

  • Premium users get 10% off all shop purchases

๐Ÿ” Admin Commands

  • /admin premium accepts duration in days
  • /admin findwealth and /admin resetwealth for economy management

๐Ÿ” Codebase Audit

  • Fixed critical premium NULL bug, cooldown key mismatches, removed duplicate functions

๐Ÿ“‹ top.gg Voting

  • New /vote command with rewards, vote badges, and auto-refreshing status page

v1.4.1

July 2026

โญ Premium System

  • Bot owner can grant premium via /admin premium add/remove
  • 2x daily rewards, 2x chat coins, +1% bonus interest

v1.4.0

July 2026

๐Ÿ’ฌ Chat Rewards

  • Earn 2 coins per message with spam protection, builds chat bonus for interest

๐ŸŽฒ New Commands

  • /bet โ€” single-player bet with better odds
  • /duel โ€” challenge another player with interactive buttons

๐Ÿ’ต Interest Boost

  • Interest now pays accumulated chat bonus alongside standard 2%

v1.3.0

July 2026

๐ŸŒ Global Economy

  • Users, balances, XP, items, and cooldowns are now global across all servers

๐Ÿงน Cross-Server Clans

  • Clans are now global with invites, roles, descriptions, and activity logs

๐Ÿ“ˆ Clan XP & Levels

  • 25% of XP goes to clan. Level up for more members and interest bonus

v1.1.0

July 2026

๐Ÿ”’ Security Patches

  • Wager front-running fixed โ€” bets deduct before game resolves
  • Interest race condition fixed โ€” atomic SQL transaction with cooldown lock

๐ŸŽฒ Payout Rework

  • Blackjack and slots payouts recalculated for new upfront-deduction model

v1.0.0

July 2026

๐Ÿ’น Interest Command

  • Earn 2% daily interest on bank balance. Claim every 22 hours, capped at 5,000/day

๐ŸŒ Website v2.0

  • Complete visual redesign with glassmorphism, new typography, animated backgrounds

๐Ÿ—๏ธ Architecture Refactor

  • Blackjack engine extracted to module, codebase more maintainable

๐Ÿ“ฃ Interactive Commands

  • /commands page with live search and category filter

v0.6.2

July 2026

๐Ÿ›๏ธ Shop & Market

  • /buy [quantity] for multi-purchase
  • Market pagination for browsing

๐Ÿ“ฆ Mystery Boxes

  • New prizes including Lucky Ace, Fishing Rod, and another Mystery Box

โš™๏ธ Fixes

  • Use cooldown, race condition fix, changelog in nav bar

v0.6.1

July 2026

๐ŸŒ Blackjack

  • Interactive Hit/Stand buttons. Blackjack pays 1.5x

๐ŸŽฐ Lottery

  • Buy tickets, auto-draw every 6 hours, 90% pot to winner

๐Ÿ“… Daily Streaks

  • Consecutive claims give +25% per day up to 3x

โ„น๏ธ Utilities

  • /iteminfo, /cooldowns, /support commands

v0.6.0

July 2026

๐ŸŽฐ Lottery System

  • Buy tickets for a chance to win the server pot

๐Ÿ“… Daily Streaks

  • Bonus multipliers for consecutive claims

v0.5.0

July 2026

๐ŸŽฏ New Commands

  • Heist, Interest, Gift Item, Rank commands

๐Ÿ›๏ธ Shop Expansion

  • Heist Blueprint (3,500) and Lucky Ace (2,500)

๐ŸŒ Website Overhaul

  • Live stats, dark theme, mobile-friendly, terms/privacy pages