kkapil9112/Aestheticmodes9_botPublic · Bot Template

AIA Telegram-based digital goods store bot with a full admin panel for managing products, plans, stock, keys, categories, resellers, balances, and coupons. It uses TeleBotHost APIs like Bot, Api, User, Libs.ResourcesLib, and HTTP to run a shop interface, handle admin-only commands, track users, and send inventory/balance summaries. The implementation appears focused on selling game-related accounts and keys such as FreeFire items, with customer-facing store, balance, coupon, and back-to-menu flows.

Commerceshopadmin-panelbalanceresellercouponsstock-management
ProfileTelegram
102 commands1 envUpdated 29d agoCreated Aug 9, 2026
Back to folder

commands/_confirm_rem_stock.js

javascript · 49 lines

Raw
1/**#command2name: /confirm_rem_stock3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13  var adminId = "8812621370";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}