ashoksarande3/ASHOK_HACK_STORE_BOTPublic · Bot Template

AIThis bot operates as a commercial storefront for selling Free Fire game hacks and cheats via UPI QR code payments. It features a dynamic pricing system with separate normal and reseller prices, product plans with flexible durations (days, hours, minutes), and a reseller program requiring a one-time upgrade fee. The bot handles payment verification through QR code generation and expiry tracking, user verification via Telegram contact sharing, and admin tools for stock management, plan creation, and ownership transfer. It includes a balance system, maintenance mode, and Telegram Stars payment fallback. The codebase uses TeleBotHost's TBL JavaScript APIs (Bot, Api, HTTP, db properties, Libs) for all logic.

Commercefreefiregame-hacksupi-paymentsqr-codesreseller-systemdynamic-pricing
ProfileTelegram
102 commands0 envUpdated 16d agoCreated Aug 22, 2026
Back to folder

commands/_setresellerprice.js

javascript · 50 lines

Raw
1/**#command2name: /setresellerprice3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 💰 COMMAND = /setresellerprice14// STATUS: 100% ACCURATE KEY MATCHING FIX15// =========================================================16 17var input = message.replace("/setresellerprice", "").trim(); 18var parts = input.split("|");19 20if (parts.length === 3) {21  // 1️⃣ PRODUCT NAME: UpperCase + Trim (Jaise main buyitem script me hai)22  var pName = parts[0].trim().toUpperCase(); 23  24  // 2️⃣ PLAN DAYS: Sirf number nikalenge (Jaise "7_Day" ya "7 Days" se "7" bachega)25  var pPlan = String(parts[1]).replace(/[^0-9]/g, "").trim(); 26  27  // 3️⃣ PRICE: Force Floating/Integer Number parsing28  var pPrice = parseFloat(parts[2].trim());29 30  if (isNaN(pPrice)) {31    Bot.sendMessage("❌ Price ek number hona chahiye!");32    return;33  }34 35  // 🔥 MAIN MATCHING KEY FIX: direct buyitem loop database properties alignment36  var targetDatabaseKey = "price_reseller_" + pName + "_" + pPlan;37 38  // Real number me save karenge taaki exact math response aaye39  Bot.setProperty(targetDatabaseKey, pPrice, "number");40  41  Bot.sendMessage("✅ <b>Reseller Price Updated Successfully!</b>\n\n" +42                  "📦 <b>Product:</b> <code>" + pName + "</code>\n" +43                  "⏱️ <b>Plan:</b> <code>" + pPlan + " Days</code>\n" +44                  "💵 <b>New Price:</b> ₹" + pPrice, { parse_mode: "HTML" });45 46} else {47  Bot.sendMessage("⚠️ <b>Galat Format!</b>\n\n" +48                  "📝 <b>Format:</b>\n<code>/setresellerprice PRODUCT NAME | DAYS | PRICE</code>\n\n" +49                  "💡 <b>Example:</b>\n<code>/setresellerprice PRIME HOOK | 7 | 64</code>", { parse_mode: "HTML" });50}