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.
commands/_confirm_rem_stock.js
javascript · 49 lines
1/**#command2name: /confirm_rem_stock3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 var adminId = "8660373585";14 if (String(chat.chatid) !== adminId) return;15 16 if (!params) return;17 18 // Params split karein (slug aur stock index nikalne ke liye)19 var parts = params.split(" ");20 var slug = parts[0];21 var stockIndex = parseInt(parts[1]);22 23 var currentStock = Bot.getProperty("ff_stock_" + slug) || [];24 if (!Array.isArray(currentStock) || stockIndex >= currentStock.length) {25 Bot.sendMessage("❌ Account pehle hi delete ho chuka hai ya nahi mila.");26 return;27 }28 29 // Target account ka data store karein report ke liye30 var deletedAccount = currentStock[stockIndex];31 32 // Array se us specific index ko delete karein33 currentStock.splice(stockIndex, 1);34 35 // Database me updated array save karein36 Bot.setProperty("ff_stock_" + slug, currentStock, "json");37 38 // Success message confirmation ke sath39 Bot.sendMessage("🗑 <b>Stock Deleted Successfully!</b>\n\n• <b>Category:</b> " + slug.toUpperCase() + "\n• <b>Removed Data:</b> <code>" + deletedAccount + "</code>", {parse_mode: "HTML"});40 41 // Stock list ko refresh karne ke liye auto-run karein taaki updated list dikhe42 Bot.run({43 command: "/view_rem_stock",44 options: { params: slug }45 });46 47} catch (e) {48 Bot.sendMessage("Error: " + e.message);49}