mansuriamaan803/SANJEEVFFSTORE_botPublic · Bot Template
AIThis bot is a commerce platform for selling digital products, primarily focused on FreeFire accounts and related services. It provides admin tools for managing products, categories, stock, reseller roles, and a balance system for user payments. Users can browse products, apply coupons, and check their balance through an interactive interface with premium emojis and inline keyboards.
Commercecommercestoreproductsresellerbalancecoupon
102 commands0 envUpdated 12d agoCreated Aug 26, 2026
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 = "8963001413";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}