indrajitghosh20006/Igstore_01botPublic Β· Bot Template
AIThe bot provides an admin interface for a digital store, allowing the owner or coβadmins to add balances, products, plans, and categories. It supports payment workflows via UPI and Binance Pay, automatically generating QR codes and handling manual approval of deposits. The code patches inline keyboards to use premium emoji icons and includes helper functions for user and bot properties. Overall, it serves as a commerce management tool for a Telegram-based storefront.
Commercestoreadminbalanceproductplancategory
170 commands0 envUpdated 8h agoCreated Oct 30, 2026
commands/_confirm_rem_stock.js
javascript Β· 90 lines
1/**#command2name: /confirm_rem_stock3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// PREMIUM BUTTON ICONS13(function(){14 try {15 if (!JSON.__premiumPatched) {16 var __origStringify = JSON.stringify;17 JSON.stringify = function(value, replacer, space) {18 try {19 if (value && value.inline_keyboard && Array.isArray(value.inline_keyboard)) {20 var premiumIds = [21 "6143444134125379822",22 "6091379307907652768",23 "6147534454819661264",24 "6147817325660741985",25 "6235683689292897318",26 "6102856637343600044"27 ];28 var rows = value.inline_keyboard.map(function(row, ri) {29 if (!Array.isArray(row)) return row;30 return row.map(function(btn, bi) {31 if (!btn || typeof btn !== "object") return btn;32 var copy = {};33 for (var k in btn) copy[k] = btn[k];34 if (!copy.icon_custom_emoji_id) copy.icon_custom_emoji_id = premiumIds[(ri + bi) % premiumIds.length];35 return copy;36 });37 });38 var cloned = {};39 for (var key in value) cloned[key] = value[key];40 cloned.inline_keyboard = rows;41 return __origStringify.call(JSON, cloned, replacer, space);42 }43 } catch (e) {}44 return __origStringify.call(JSON, value, replacer, space);45 };46 JSON.__premiumPatched = true;47 }48 } catch (e) {}49})();50 51 52 53try {54 var adminId = "7839151435";55 if (String(chat.chatid) !== adminId) return;56 57 if (!params) return;58 59 // Params split karein (slug aur stock index nikalne ke liye)60 var parts = params.split(" ");61 var slug = parts[0];62 var stockIndex = parseInt(parts[1]);63 64 var currentStock = Bot.getProperty("ff_stock_" + slug) || [];65 if (!Array.isArray(currentStock) || stockIndex >= currentStock.length) {66 Bot.sendMessage("β Account pehle hi delete ho chuka hai ya nahi mila.");67 return;68 }69 70 // Target account ka data store karein report ke liye71 var deletedAccount = currentStock[stockIndex];72 73 // Array se us specific index ko delete karein74 currentStock.splice(stockIndex, 1);75 76 // Database me updated array save karein77 Bot.setProperty("ff_stock_" + slug, currentStock, "json");78 79 // Success message confirmation ke sath80 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"});81 82 // Stock list ko refresh karne ke liye auto-run karein taaki updated list dikhe83 Bot.run({84 command: "/view_rem_stock",85 options: { params: slug }86 });87 88} catch (e) {89 Bot.sendMessage("Error: " + e.message);90}