ayushyadav7970824760/goldensellingstore_botPublic · Bot Template
AIThis Telegram store bot lets customers browse digital products and plans, apply coupons, add funds via UPI, and receive purchased keys. It includes a full admin panel for managing products, reordering items, setting reseller prices, viewing and removing key stock, configuring UPI payment details and update links, and checking user balances. Co-admins and resellers are supported, and support tickets are forwarded to the admin.
Commercedigital_storeadmin_panelupi_paymentsresellercouponskey_stock
146 commands0 envUpdated 2d agoCreated Sep 5, 2026
commands/_remcat_id.js
javascript · 57 lines
1/**#command2name: /remcat_id3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 var adminId = "8477746023";14 if (!chat || String(chat.chatid) !== adminId) return;15 16 // 🛡️ CRASH FIX: Pehle check karenge ki message null toh nahi hai17 if (!message) {18 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"});19 return;20 }21 22 var cleanMessage = message.trim();23 24 // Agar message me command text shuru me hai toh use clean karein25 if (cleanMessage.indexOf("/remcat_id") === 0) {26 cleanMessage = cleanMessage.replace("/remcat_id", "").trim();27 }28 29 if (!cleanMessage) {30 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"});31 return;32 }33 34 // FIXED: Sahi slug creation algorithm jo addcat_id script ke bilkul same hai35 var catSlug = cleanMessage.toLowerCase().replace(/[^a-z0-9]/g, "");36 37 var categories = Bot.getProperty("ff_categories") || {};38 39 if (!categories[catSlug]) {40 Bot.sendMessage("❌ <b>Category nahi mili!</b>\n\nEk baar naam sahi se check karein ya menu me jaakar dekhein.", {parse_mode: "HTML"});41 return;42 }43 44 var oldName = categories[catSlug].name;45 46 // Category array/object se remove karein47 delete categories[catSlug];48 Bot.setProperty("ff_categories", categories, "json");49 50 // Associated stock database se completely wipe out karein51 Bot.setProperty("ff_stock_" + catSlug, null);52 53 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"});54 55} catch(e) {56 Bot.sendMessage("Error in Remove Category: " + e.message);57}