amanjha18v/AMAN_SHOPS_BOTPublic · Bot Template

AIAMAN SHOP STORE appears to be a Telegram automation bot. Commands include /*, /addbal, /addbal_all, /addbal_binance, /addbal_binance_approve, /addbal_binance_paid, /addbal_upi, /addcat_id. Observed in code: messaging, http, libs, keyboards, payments.

Utilityutility
ProfileTelegram
132 commands0 envUpdated 7h agoCreated Sep 4, 2026
Back to folder

commands/_allkey.js

javascript · 78 lines

Raw
1/**#command2name: /allkey3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13  var adminId = "5191323229"; // Aapki Admin ID14  if (String(chat.chatid) !== adminId) return;15 16  var productList = [];17  try {18    productList = Bot.getProperty("stored_products") || [];19  } catch (err) {20    productList = [];21  }22 23  var inlineButtons = [];24 25  // 🛡️ SYSTEM SAFEGUARD: Agar master product data structural crash ho, to standard hardcoded check fallback lagana26  if (!productList || productList.length === 0) {27    // Agar empty list hai to manually display list paths28    inlineButtons.push([29      { text: "🔄 Load DRIP CLIENT (1 Day)", callback_data: "/view_keys_list DRIP CLIENT|1_Day" }30    ]);31  } else {32    // Standard dynamic listing execution loop33    for (var i = 0; i < productList.length; i++) {34      var product = productList[i];35      if (!product || !product.name) continue;36 37      var plans = product.plans || [];38      // Default configurations display if plans empty39      if (plans.length === 0) {40        plans = [{ days: "1" }, { days: "7" }];41      }42 43      for (var j = 0; j < plans.length; j++) {44        var plan = plans[j];45        if (!plan || !plan.days) continue;46        47        var cleanProdName = product.name.trim();48        var cleanPlanDays = String(plan.days).trim() + "_Day";49        50        var stockKeyText = "stock_" + cleanProdName + "_" + cleanPlanDays;51        var currentStock = Bot.getProperty(stockKeyText) || [];52 53        inlineButtons.push([54          {55            text: cleanProdName.toUpperCase() + " (" + plan.days + " Days) - [" + currentStock.length + " Keys]",56            callback_data: "/view_keys_list " + cleanProdName + "|" + cleanPlanDays57          }58        ]);59      }60    }61  }62 63  // Final menu check interface safety attachment64  if (inlineButtons.length === 0) {65    inlineButtons.push([{ text: "🔄 Refresh Stock Matrix", callback_data: "/allkey" }]);66  }67 68  var menuText = "<blockquote><b>🔑 GLOBAL STOCK AUDIT LOGS</b>\n\n" +69                 "<i>Niche diye gaye buttons me product aur uske plan ka live stock status dikh raha hai. Saari keys dekhne ke liye click karein:</i></blockquote>";70 71  Bot.sendMessage(menuText, {72    parse_mode: "HTML",73    reply_markup: JSON.stringify({ inline_keyboard: inlineButtons })74  });75 76} catch (err) {77  Bot.sendMessage("⚠️ Master Inventory Render Error: " + err.message);78}