tarunpoonia905/OfcDevShopBotPublic · Bot Template
AIDEV SHOP appears to be a Telegram automation bot. Commands include /confirm_delete_stock, /addstock_id, /extkey_menu, /partner_api, /apidelete, /buy_hack_cat, /admin_manage_products, /check_buy. Observed in code: messaging, keyboards, payments, libs, web, http, games.
Utilityutility
228 commands0 envUpdated 12d agoCreated Oct 18, 2026
commands/_ff_id_menu.js
javascript · 140 lines
1/**#command2name: /ff_id_menu3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/*#SIZE_V1*/try{(function(){var z=Bot.getProperty("ui_btn_size");var mx=z==="large"?1:(z==="medium"?2:0);if(!mx||Api.__sz)return;var NAV=/^[◀▶⬅➡«»‹›⏪⏩]|\d+\s*\/\s*\d+|prev|next|page/i;var T=function(m){try{var o=typeof m==="string"?JSON.parse(m):m;if(!o||!o.inline_keyboard)return m;var out=[],cnt=0;o.inline_keyboard.forEach(function(row){var nav=row.some(function(b){return NAV.test(String(b.text||"").trim());});if(row.length<=mx||nav){out.push(row);cnt+=row.length;return;}for(var i=0;i<row.length;i+=mx){var c=row.slice(i,i+mx);out.push(c);cnt+=c.length;}});if(cnt>100||out.length>100)return m;o.inline_keyboard=out;return typeof m==="string"?JSON.stringify(o):o;}catch(e){return m;}};["sendMessage","editMessageText","editMessageCaption","editMessageReplyMarkup","sendPhoto","sendVideo","sendAnimation","sendDocument"].forEach(function(n){var f=Api[n];if(typeof f!=="function")return;Api[n]=function(p){try{if(p&&p.reply_markup)p.reply_markup=T(p.reply_markup);}catch(e){}return f.apply(Api,arguments);};});Api.__sz=true;})();}catch(__szE){}13/*#ANIM_V1*/try{(function(){var M={party:"5046509860389126442",fire:"5104841245755180586",heart:"5159385139981059251",like:"5107584321108051014"};var a=Bot.getProperty("ui_anim");if(!a||!M[a]||Api.__an)return;var E=M[a];var OK=/PURCHASE SUCCESSFUL|PAYMENT SUCCESSFUL|Payment verified|CONGRATULATIONS/i;var priv=function(p){return p&&p.chat_id&&String(p.chat_id).charAt(0)!=="-";};["sendMessage","sendPhoto","sendVideo","sendAnimation"].forEach(function(n){var f=Api[n];if(typeof f!=="function")return;Api[n]=function(p){try{if(priv(p)&&!p.message_effect_id&&OK.test(String(p.text||p.caption||"")))p.message_effect_id=E;}catch(e){}return f.apply(Api,arguments);};});var fe=Api.editMessageText;if(typeof fe==="function"){Api.editMessageText=function(p){var r=fe.apply(Api,arguments);try{if(priv(p)&&OK.test(String(p.text||"")))Api.sendMessage({chat_id:p.chat_id,text:"🎉",message_effect_id:E});}catch(e){}return r;};}Api.__an=true;})();}catch(__anE){}14/*#PREMIUM_UI_V1*/try{(function(){if(Bot.getProperty("ui_premium")!==true||Api.__pm)return;var R=function(t,c){var s=(String(t||"")+" "+String(c||"")).toLowerCase();if(/back|cancel|close|delete|remove|clear|reject|stop|ban|exit/.test(s))return"danger";if(/pay|buy|confirm|verify|paid|add|deposit|shop|claim|yes|receive|wallet|download|update/.test(s))return"success";return"primary";};var T=function(m){try{var o=typeof m==="string"?JSON.parse(m):m;if(!o||!o.inline_keyboard)return m;o.inline_keyboard.forEach(function(row){row.forEach(function(b){if(b.copy_text||b.url||b.callback_data||b.web_app){b.style=R(b.text,b.callback_data||b.url);if(!b.icon_custom_emoji_id&&b.text&&!/^[\u2600-\u27BF\uD83C-\uD83E]/.test(String(b.text).trim())&&!/^[✦✨💎]/.test(b.text))b.text="✦ "+b.text;}});});return typeof m==="string"?JSON.stringify(o):o;}catch(e){return m;}};["sendMessage","editMessageText","editMessageCaption","editMessageReplyMarkup","sendPhoto","sendVideo","sendAnimation","sendDocument"].forEach(function(n){var f=Api[n];if(typeof f!=="function")return;Api[n]=function(p){try{if(p&&p.reply_markup)p.reply_markup=T(p.reply_markup);}catch(e){}return f.apply(Api,arguments);};});Api.__pm=true;})();}catch(__pmE){}15 16 17try {18 19 // Answer Callback safely20 if (request && request.id) {21 try {22 Api.answerCallbackQuery({ callback_query_id: request.id });23 } catch (e) {}24 } else if (request && request.callback_query && request.callback_query.id) {25 try {26 Api.answerCallbackQuery({ callback_query_id: request.callback_query.id });27 } catch (e) {}28 }29 30 // Safe Chat ID Selection31 var targetChatId = (chat && chat.chatid) ? chat.chatid : ((chat && chat.id) ? chat.id : user.telegramid);32 33 var categories = Bot.getProperty("ff_categories") || {};34 var inlineButtons = [];35 var hasCategories = false;36 37 for (var slug in categories) {38 if (!categories.hasOwnProperty(slug)) continue;39 40 hasCategories = true;41 42 var item = categories[slug];43 var stock = Bot.getProperty("ff_stock_" + slug) || [];44 45 if (!Array.isArray(stock)) stock = [];46 47 var buttonText = item.name;48 var buttonStyle = "primary"; // Default Blue Color49 50 if (stock.length === 0) {51 buttonText += " [OUT OF STOCK]";52 buttonStyle = "danger"; // Native Red Color53 } else {54 buttonText += " [Stock: " + stock.length + "]";55 buttonStyle = "success"; // Native Green Color56 }57 58 // Dynamic Emoji ID: Admin jo ID save karega, exact wahi inject hogi.59 var adminPremiumEmojiId = item.emoji_id || "5334890573281114250";60 61 inlineButtons.push([62 {63 text: buttonText,64 callback_data: "/select_id_product " + slug,65 style: buttonStyle, 66 icon_custom_emoji_id: adminPremiumEmojiId 67 }68 ]);69 }70 71 // Agar categories na ho toh Danger (Red) Button72 if (!hasCategories) {73 inlineButtons.push([74 {75 text: "⚠️ No Platforms Active",76 callback_data: "/back",77 style: "danger"78 }79 ]);80 }81 82 // ✅ UPDATED: Back button styled to Primary (Blue) with your specific Premium Emoji ID83 inlineButtons.push([84 {85 text: "Back to Dashboard",86 callback_data: "/back",87 style: "danger",88 icon_custom_emoji_id: "5893163582194978381"89 }90 ]);91 92 // 📊 Live stats footer93 var totalCategories = 0;94 var totalStockAll = 0;95 for (var s in categories) {96 if (!categories.hasOwnProperty(s)) continue;97 totalCategories++;98 var st = Bot.getProperty("ff_stock_" + s) || [];99 if (Array.isArray(st)) totalStockAll += st.length;100 }101 102 var text =103 "<blockquote><b><tg-emoji emoji-id='6080228009439141516'>🎮</tg-emoji> FF ID STORE — SELECT A PLATFORM <tg-emoji emoji-id='6093854128193152827'>🔥</tg-emoji></b>\n\n" +104 "<i>Browse our available categories below. Instant delivery, verified accounts.</i></blockquote>\n" +105 "━━━━━━━━━━━━━━━━━━━━━\n" +106 "<tg-emoji emoji-id='6080214566191505147'>📦</tg-emoji> <b>Categories:</b> <code>" + totalCategories + "</code> " +107 "<tg-emoji emoji-id='6091571559233755994'>📥</tg-emoji> <b>Total Stock:</b> <code>" + totalStockAll + " accounts</code>\n" +108 "━━━━━━━━━━━━━━━━━━━━━";109 110 var targetMessageId = (request && request.message) ? request.message.message_id : null;111 112 var replyMarkupObj = {113 inline_keyboard: inlineButtons114 };115 116 if (targetMessageId) {117 Api.editMessageText({118 chat_id: targetChatId,119 message_id: targetMessageId,120 text: text,121 parse_mode: "HTML",122 reply_markup: JSON.stringify(replyMarkupObj)123 });124 } else {125 Api.sendMessage({126 chat_id: targetChatId,127 text: text,128 parse_mode: "HTML",129 reply_markup: JSON.stringify(replyMarkupObj)130 });131 }132 133} catch (e) {134 var errorChatId = (chat && chat.chatid) ? chat.chatid : user.telegramid;135 Api.sendMessage({136 chat_id: errorChatId,137 text: "❌ Error structure:\n<code>" + e.message + "</code>",138 parse_mode: "HTML"139 });140}