# 🎮 GRFTY Discord Game Bot > Version: 1.0 Domains: Discord Gaming • Crypto Social • LLM UX Core Stack: Discord.js • SQLite • ChainGPT LLM • Solana (USDC) for boosts/payouts **Published by:** [GRFTY](https://paragraph.com/@grfty/) **Published on:** 2025-08-26 **Categories:** ai, crypto, game, bot, web3 **URL:** https://paragraph.com/@grfty/discord-game-bot ## Content ⚡ TL;DRGRFTY is a fast, social, crypto-native Discord game bot with three headline modes:⚔ GRFT Duels — challenge a user; they get 8h to respond or auto-forfeit.🏟 GRFTY Rumble — elimination game with kill/death/revival (incl. mass events).🚀 Raids — time-boxed Twitter/X engagements with verified requirements & points.🤖 ChainGPT powers short, savage, on-brand narration (challenge lines, arena results, rumble events, raid copy hints). Admins can toggle Exact / Hybrid / Full LLM live. Hybrid falls back to curated phrases under latency/budget.🎯 Why GRFTY?🧲 High-energy loops: duel clocks, live eliminations, raid deadlines.🧪 Crypto-native flavor: memecoins, NFT lore, conference chaos—kept sharp via ChainGPT + phrase banks.🏅 Status & stakes: role transfers on timeouts, 7-day Activity Score, prize pools, Solana boosts.🕹 Game Modes & Flow⚔ A) GRFT Duels (1v1) Flow/grft challenge @user → posts to GRFTs in Progress with a live 8h timer.If P2 responds in time → chance-based result (weighted by Activity Score) in GRFT Arena; points awarded; roles unchanged.If no response → Auto-Win to P1, kill-style line in GRFT Arena; loser forfeits highest whitelist role; winner gains next level (unless max); points awarded.Cooldowns: default 8h; bypass for admins/whitelisted users. P1 can challenge again once P2 replies (even before 8h elapses).Roles & PointsTiers: 🦍 GRIZL GANG (top) → 🧠 GRFTY OG → ✅ GRFTY WL.Timeouts can transfer tier; wins vs high-tier on response grant elevated points (no role change).ChainGPT UsageChallenge lines & Arena narration (timeout/chance wins).ReliabilityImmediate ACK + later edit → no Discord “did not respond”.LLM hard timeouts → phrase fallback.🏟 B) GRFTY Rumble (Battle Royale) FlowHost starts game → users react 😈 to join.Configurable countdown ⏳, min players, early start threshold, random images.Rounds: Kill / Death / Revival events; occasional Mass Death / Mass Revival.End: 🏁 Stats posted (🥇/🥈/🥉, Most Kills); points update leaderboard.ChainGPT UsageKill/Death/Revival lines + Mass Event headers (Hybrid/LLM).Exact uses curated banks only.Activity Score ModRolling 7-day Activity Score (0–100) slightly adjusts survival/kill odds (bounded, fair).🚀 C) Raids (Twitter/X)Flow/raid start → set tweet URL, length, base points, required phrase, image required?Bot announces in RAID channel; pings a configured role; shows countdown.Users reply on X, then /raid submit with their reply URL.Bot verifies:✅ Is a reply to the target tweet✅ Contains required phrase✅ If image required, matches approved NFT image set (perceptual hash)✅ Not previously submittedPoints decay over time; raid closes at deadline; points finalize.ChainGPT UsageOptional raid copy suggestions + announcement flair.🧮 Scoring, Leaderboard & Activity ScoreLeaderboard Columns👤 User🎮 GRFTY Games Played • 💀 Kills • 🏅 1st/2nd/3rd • 🧾 GRFTY Game Total⚔ Attempted GRFTs • 🦍/🧠/✅ Timeout GRFTs by tier • 🗡 GRFTs (total) • 📈 GRFT Total📣 Raid Points🔥 Activity Score (0–100)🧮 Total Score = GRFTY Game Total + GRFT Total + Raid PointsActivity Score (AS)Based on main chat messages, rolling 7 days.Boosts: $5 → +25 AS for 7 days, stackable up to 100. After 7 days, boosted AS falls off; natural chat AS remains.🤖 ChainGPT IntegrationGeneratesChallenge lines (Duels)Arena narration (timeouts/chance results)Rumble events & mass headersOptional raid copy hintsModes🎯 Exact: curated phrases only (0 API calls)🧪 Hybrid (default): try ChainGPT → fallback to phrases on timeout/error🚀 Full LLM: always use ChainGPT (with latency guard)Latency Guard~1.5s timeout → immediate fallback (game flow never blocks).Slash commands ACK first, edit later.Admin Controls/admin phrases-mode exact|hybrid|llm/admin set-phrases (JSON import)Cooldown bypass toggles & per-user whitelistMinimal API FootprintTiny prompts, low max_tokens, consistent style output.🔒 Security & ReliabilityPermissions: Send/Manage Messages (optional), Manage Roles (duel timeouts), Read History, Add Reactions, Use Commands.Gating: Only approved roles/users can start Rumbles/Raids & configure payouts.Anti-timeout: Instant ACK; LLM fallback; WAL & busy timeouts in SQLite.Automod-friendly: Zero-width content wrappers to avoid embed-spam flags.Role safety: Check bot role hierarchy before transfers.Config safety: KV/DB auto-heal; admin throttling (e.g., 1 change / 10s); audit logs to private channel.ChainGPT SafetyShort prompts; hard timeouts; post-processing to enforce mention format and length. On-Chain & Payments (Boosts & Prize Pool)BoostsPurchase via Solana Pay (USDC) → +25 AS / 7d, stackable up to 100.Public boost activity feed; prize pool UI shows team seed + user contributions and team fee %.Prize PoolMonthly winners via Total Score.Payout Options:🧾 Unsigned tx for multisig approval via /pool payout-confirm (recommended)🔥 Direct payouts (hot wallet) only if you accept operational risk (role-gated + logged)🛠 Admin UX (Selected Commands)Channels /admin set-channels in_progress|arena|commands|leaderboard|rumble|raid|boost_announce|main|admin_log #channelHosts/Permissions /admin set-hosts rumble @role/@user … • /admin get-hosts /rumble-admin set-ping-role @role • /raid-admin set-ping-role @rolePhrases & LLM /admin phrases-mode exact|hybrid|llm /admin set-phrases (JSON)Duels /grft challenge @user • /grft respond id • /grft mine • /grft sweep-expired Admin cooldown bypass toggles & per-user overridesRumble /rumble start with countdown, min players, early start, imagesRaids /raid start (tweet, length, points, phrase, image rule) /raid submit (reply URL; verified)Leaderboard /leaderboard post (simple/expanded), /leaderboard pin, /leaderboard auto-refresh setBoosts/Pool /boosts set-price • /boosts set-as-points • /boosts set-cap /pool set-team-fee • /pool info • /pool payout-confirmAll admin actions are throttled and audit-logged.🧩 Developer NotesArchitectureDiscord.js v14+ botSQLite (WAL, light migrations, KV config)ChainGPT chat-style endpoint (URL + API key)Solana client for boosts/payout ops (USDC)ChainGPT Call (shape)await fetch(CHAINGPT_API_URL, { method: 'POST', headers: { Authorization: `Bearer ${CHAINGPT_API_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ messages: [{ role: 'user', content: prompt }], max_tokens: 60, temperature: 0.9, }), signal: AbortSignal.timeout(1500), }); Reliability PatternsACK first → editReply laterLLM timeout → phrase fallbackPer-guild KV config, safe defaults, schema auto-heal🗺 Roadmap🌐 Web dashboard (tuning & analytics)🛡 Stronger raid verifiers & fraud heuristics📦 Season tooling & recaps🎭 Extensible phrase packs (brand collabs)🔍 Optional anti-abuse models🤝 Why ChainGPT?🎨 Consistent crypto-native micro-copy for live game loops⚡ Low-latency short generations fit our hard timeout model🧩 Straightforward API; easy to fallback without breaking UX ## Publication Information - [GRFTY](https://paragraph.com/@grfty/): Publication homepage - [All Posts](https://paragraph.com/@grfty/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@grfty): Subscribe to updates - [Twitter](https://twitter.com/grfty_ai): Follow on Twitter