indrajitghosh20006/HgfhhuybotPublic · Bot Template
AIThis bot provides a command‑based admin interface for managing user balances, products, and resellers. It supports adding balances via UPI or Binance Pay, approving payments, and configuring product details and categories. The bot also handles user role changes, stock uploads, and offers a simple calculator UI for entering amounts. All interactions are handled through short commands and inline keyboards, with no long‑running listeners or external frameworks.
Utilityadminbalanceproductresellerpaymentupi
138 commands0 envUpdated 15h agoCreated Sep 27, 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 = "7839151435";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}