indrajitghosh20006/HgfhhuybotPublic · Bot Template

ProfileTelegram

AIThis bot provides a command‑based admin interface for managing user balances, products, and resellers. It supports adding balances via UPI or Binance Pay, approving payments, and configuring product details and categories. The bot also handles user role changes, stock uploads, and offers a simple calculator UI for entering amounts. All interactions are handled through short commands and inline keyboards, with no long‑running listeners or external frameworks.

Utilityadminbalanceproductresellerpaymentupi
138 commands0 envUpdated 15h agoCreated Sep 27, 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 = "7839151435";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}