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/_addfund.js
javascript · 109 lines
1/**#command2name: /addfund3answer: 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 17// =========================================================18// 💰 COMMAND = Initial Deposit Keypad Setup19// STATUS: ✅ PREMIUM CALCULATOR UI — colored buttons + premium emojis20// (kept in sync with /press.js so the screen never "flickers"/changes21// style when the user presses the first digit)22// =========================================================23 24try {25 // Amount ko shuru me 0 set karein26 User.setProperty("deposit_amount", "0", "string");27 28 // 💎 Premium Emoji Set — user-provided premium IDs applied across this screen29 let e_money = "<tg-emoji emoji-id='6312263493051489212'>💰</tg-emoji>";30 let e_clear = "<tg-emoji emoji-id='5348224471050238603'>✏</tg-emoji>";31 let e_confirm = "<tg-emoji emoji-id='5348191451341668809'>✅</tg-emoji>";32 let e_back = "<tg-emoji emoji-id='5893163582194978381'>⬅️</tg-emoji>";33 let e_hour = "<tg-emoji emoji-id='6100657257605763582'>✔️</tg-emoji>";34 let e_check = "<tg-emoji emoji-id='6311870645277825763'>✔️</tg-emoji>";35 36 // 🎨 Main message — premium "Enter Custom Amount" calculator screen37 let msg =38 "<blockquote>" + e_money + " <b>ADD BALANCE — ENTER AMOUNT</b> <tg-emoji emoji-id='6312263493051489212'>💎</tg-emoji></blockquote>\n" +39 "━━━━━━━━━━━━━━━━━━━━━\n\n" +40 "<tg-emoji emoji-id='6312263493051489212'>💎</tg-emoji> <b>Amount:</b> ₹<code>0</code>\n\n" +41 "━━━━━━━━━━━━━━━━━━━━━\n" +42 e_check + " <i>Instant Auto-Credit</i>\n" +43 "<tg-emoji emoji-id='6215386799133433653'>🔒</tg-emoji> <i>100% Secure UPI Payment</i>\n" +44 e_hour + " <i>Verified in Seconds</i>\n\n" +45 "<tg-emoji emoji-id='6100170496077204999'>👑</tg-emoji> <i>Use the keypad below to enter amount</i>";46 47 // 🎨 Styled keyboard payload — blue number pad, red clear/back, green confirm48 let keyboard = [49 [50 { text: "1", callback_data: "/press 1", style: "primary" },51 { text: "2", callback_data: "/press 2", style: "primary" },52 { text: "3", callback_data: "/press 3", style: "primary" }53 ],54 [55 { text: "4", callback_data: "/press 4", style: "primary" },56 { text: "5", callback_data: "/press 5", style: "primary" },57 { text: "6", callback_data: "/press 6", style: "primary" }58 ],59 [60 { text: "7", callback_data: "/press 7", style: "primary" },61 { text: "8", callback_data: "/press 8", style: "primary" },62 { text: "9", callback_data: "/press 9", style: "primary" }63 ],64 [65 { text: "Clear", callback_data: "/press clear", style: "danger", icon_custom_emoji_id: "5348224471050238603" },66 { text: "0", callback_data: "/press 0", style: "primary" },67 { text: "Confirm", callback_data: "/press confirm", style: "success", icon_custom_emoji_id: "5348191451341668809" }68 ],69 [70 { text: "Back", callback_data: "/back", style: "danger", icon_custom_emoji_id: "5893163582194978381" }71 ]72 ];73 74 // 'request.message' check karta hai ki kya ye kisi button click se trigger hua hai75 // ✅ BUG FIX: agar previous message ek PHOTO thi (jaise DP-attached Profile),76 // editMessageText kaam nahi karta — isi wajah se Profile se "Add Fund" click77 // karne par deposit screen aati hi nahi thi. Ab photo ho to delete + fresh send.78 if (request && request.message && request.message.message_id) {79 if (request.message.photo) {80 try { Api.deleteMessage({ chat_id: chat.chatid, message_id: request.message.message_id }); } catch (delErr) {}81 Api.sendMessage({82 chat_id: chat.chatid,83 text: msg,84 parse_mode: "HTML",85 reply_markup: JSON.stringify({ inline_keyboard: keyboard })86 });87 } else {88 // Alag se naya message nahi bhejega, usi menu ko edit karke keypad bana dega89 Api.editMessageText({90 chat_id: chat.chatid,91 message_id: request.message.message_id,92 text: msg,93 parse_mode: "HTML",94 reply_markup: JSON.stringify({ inline_keyboard: keyboard })95 });96 }97 } else {98 // Agar direct command run hua toh naya message bhejega safety ke liye99 Api.sendMessage({100 chat_id: chat.chatid,101 text: msg,102 parse_mode: "HTML",103 reply_markup: JSON.stringify({ inline_keyboard: keyboard })104 });105 }106 107} catch (err) {108 Bot.sendMessage("⚠️ System Error: " + err.message);109}