ashoksarande3/ASHOK_HACK_STORE_BOTPublic · Bot Template

AIThis bot operates as a commercial storefront for selling Free Fire game hacks and cheats via UPI QR code payments. It features a dynamic pricing system with separate normal and reseller prices, product plans with flexible durations (days, hours, minutes), and a reseller program requiring a one-time upgrade fee. The bot handles payment verification through QR code generation and expiry tracking, user verification via Telegram contact sharing, and admin tools for stock management, plan creation, and ownership transfer. It includes a balance system, maintenance mode, and Telegram Stars payment fallback. The codebase uses TeleBotHost's TBL JavaScript APIs (Bot, Api, HTTP, db properties, Libs) for all logic.

Commercefreefiregame-hacksupi-paymentsqr-codesreseller-systemdynamic-pricing
ProfileTelegram
102 commands0 envUpdated 16d agoCreated Aug 22, 2026
Back to folder

commands/_addcat_id.js

javascript · 61 lines

Raw
1/**#command2name: /addcat_id3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13  var adminId = "8660373585";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 ki details text me likh kar bhejiye!</b>\n\n<b>Sahi Format:</b>\n<code>/addcat_id [Emoji_ID] [Category Name]</code>\n\n<b>Example:</b>\n<code>/addcat_id 5323261730283863478 Facebook Id</code>", {parse_mode: "HTML"});19    return;20  }21 22  var cleanMessage = message.trim();23 24  // Command string removal25  if (cleanMessage.indexOf("/addcat_id") === 0) {26    cleanMessage = cleanMessage.replace("/addcat_id", "").trim();27  }28 29  var parts = cleanMessage.split(" ");30  if (parts.length < 2 || !parts[0] || isNaN(parts[0].substring(0, 3))) {31    Bot.sendMessage("⚠️ <b>Format Galat Hai!</b>\n\n<b>Sahi Format:</b>\n<code>[Emoji_ID] [Category Name]</code>\n\n<b>Example:</b>\n<code>5323261730283863478 Facebook Id</code>", {parse_mode: "HTML"});32    return;33  }34 35  var emojiId = parts[0].trim();36  var catName = parts.slice(1).join(" ").trim();37  38  // Dynamic safe slug creation39  var catSlug = catName.toLowerCase().replace(/[^a-z0-9]/g, "");40 41  var categories = Bot.getProperty("ff_categories");42  if (!categories || typeof categories !== "object") {43    categories = {};44  }45 46  // FIXED: Yahan emoji_id property save hogi jo menu script se synced hai47  categories[catSlug] = {48    name: catName,49    emoji_id: emojiId, 50    normal_price: 0,51    reseller_price: 052  };53 54  Bot.setProperty("ff_categories", categories, "json");55  Bot.setProperty("ff_stock_" + catSlug, [], "json");56 57  Bot.sendMessage("✅ <b>Category Successfully Added!</b>\n\n• <b>Icon:</b> <tg-emoji emoji-id='" + emojiId + "'>✨</tg-emoji>\n• <b>Name:</b> <code>" + catName + "</code>\n• <b>Emoji ID:</b> <code>" + emojiId + "</code>\n• <b>System Slug:</b> <code>" + catSlug + "</code>\n\n<i>Ab aapka FF ID menu perfect chalega!</i>", {parse_mode: "HTML"});58 59} catch(e) {60  Bot.sendMessage("Error in Add Category: " + e.message);61}