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/_view_rem_stock.js

javascript · 55 lines

Raw
1/**#command2name: /view_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  // Callback data se slug nikalna17  var slug = params ? params.trim() : "";18  if (!slug) return;19 20  var currentStock = Bot.getProperty("ff_stock_" + slug) || [];21  var categories = Bot.getProperty("ff_categories") || {};22  var catName = categories[slug] && categories[slug].name ? categories[slug].name : slug.toUpperCase();23 24  if (!Array.isArray(currentStock) || currentStock.length === 0) {25    Bot.sendMessage("📭 <b>" + catName + "</b> me abhi koi stock mojud nahi hai.", {parse_mode: "HTML"});26    return;27  }28 29  var keyboard = [];30  31  // Har ek account ke liye ek button banayein32  for (var i = 0; i < currentStock.length; i++) {33    var accountData = currentStock[i]; // Format: email|pass|price34    35    keyboard.push([36      { 37        text: "❌ " + accountData, 38        callback_data: "/confirm_rem_stock " + slug + " " + i 39      }40    ]);41  }42 43  // Wapis main list par jaane ke liye Back button44  keyboard.push([{ text: "🔙 Back to Categories", callback_data: "/remstock_id" }]);45 46  Api.sendMessage({47    chat_id: adminId,48    text: "🛒 <b>" + catName + " Stock List:</b>\n\n<i>Niche diye gaye kisi bhi account button par click karke use delete karein:</i>",49    parse_mode: "HTML",50    reply_markup: JSON.stringify({ inline_keyboard: keyboard })51  });52 53} catch (e) {54  Bot.sendMessage("Error: " + e.message);55}