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 7h agoCreated Oct 30, 2026
commands/_remcat_id.js
javascript Β· 98 lines
1/**#command2name: /remcat_id3answer: 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 (!chat || String(chat.chatid) !== adminId) return;56 57 // π‘οΈ CRASH FIX: Pehle check karenge ki message null toh nahi hai58 if (!message) {59 Bot.sendMessage("βοΈ <b>Kripya Category ka naam text me likh kar bhejiye!</b>\n\n<b>Sahi Format:</b>\n<code>/remcat_id [Category Name]</code>\n\n<b>Example:</b>\n<code>/remcat_id Facebook Id</code>", {parse_mode: "HTML"});60 return;61 }62 63 var cleanMessage = message.trim();64 65 // Agar message me command text shuru me hai toh use clean karein66 if (cleanMessage.indexOf("/remcat_id") === 0) {67 cleanMessage = cleanMessage.replace("/remcat_id", "").trim();68 }69 70 if (!cleanMessage) {71 Bot.sendMessage("β οΈ <b>Format Galat Hai!</b>\n\n<b>Sahi Format:</b>\n<code>/remcat_id [Category Name]</code>\n\n<b>Example:</b>\n<code>/remcat_id Facebook Id</code>", {parse_mode: "HTML"});72 return;73 }74 75 // FIXED: Sahi slug creation algorithm jo addcat_id script ke bilkul same hai76 var catSlug = cleanMessage.toLowerCase().replace(/[^a-z0-9]/g, "");77 78 var categories = Bot.getProperty("ff_categories") || {};79 80 if (!categories[catSlug]) {81 Bot.sendMessage("β <b>Category nahi mili!</b>\n\nEk baar naam sahi se check karein ya menu me jaakar dekhein.", {parse_mode: "HTML"});82 return;83 }84 85 var oldName = categories[catSlug].name;86 87 // Category array/object se remove karein88 delete categories[catSlug];89 Bot.setProperty("ff_categories", categories, "json");90 91 // Associated stock database se completely wipe out karein92 Bot.setProperty("ff_stock_" + catSlug, null);93 94 Bot.sendMessage("ποΈ <b>Category Successfully Deleted!</b>\n\nβ’ <b>Name:</b> <code>" + oldName + "</code>\nβ’ <b>System Slug Wiped:</b> <code>" + catSlug + "</code>\n\n<i>Yeh category aur iska saara stock ab database se hat chuka hai.</i>", {parse_mode: "HTML"});95 96} catch(e) {97 Bot.sendMessage("Error in Remove Category: " + e.message);98}