ayushyadav7970824760/goldensellingstore_botPublic · Bot Template
AIThis Telegram store bot lets customers browse digital products and plans, apply coupons, add funds via UPI, and receive purchased keys. It includes a full admin panel for managing products, reordering items, setting reseller prices, viewing and removing key stock, configuring UPI payment details and update links, and checking user balances. Co-admins and resellers are supported, and support tickets are forwarded to the admin.
Commercedigital_storeadmin_panelupi_paymentsresellercouponskey_stock
146 commands0 envUpdated 2d agoCreated Sep 5, 2026
commands/_setresellerprice.js
javascript · 50 lines
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}