kkapil9112/Hguuuuuv45botPublic · Bot Template
AITelegram commerce bot for an admin-managed digital store: admins create categories, products, time-based plans, stock entries and license keys, and can grant reseller roles or adjust user balances. End users can view their balance, start a deposit flow with an inline amount keypad, apply coupon codes, and navigate back to the store menu. It uses Bot properties for product/stock/coupon data and Libs.ResourcesLib for per-user balances.
Commercecommerceshopreselleradmin-panelbalanceproduct-management
102 commands0 envUpdated 29d agoCreated Aug 7, 2026
commands/_view_rem_stock.js
javascript · 55 lines
1/**#command2name: /view_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 // 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}