tarunpoonia905/OfcDevShopBotPublic · Bot Template

ProfileTelegram

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
Back to folder

commands/_bot_identity.js

javascript · 83 lines

Raw
1/**#command2name: /bot_identity3answer: 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// 🪪 ADMIN PANEL — "Bot Identity" (Owner only)19// Lets the owner control from /admin:20//   1) User ID          -> owner_id       (goes through the safe ownership-transfer confirmation)21//   2) Bot Username     -> bot_username   (used in Referral / Share links)22//   3) Admin Username   -> admin_username (used by the Support "Contact Admin" button)23// =========================================================24 25try {26  var ownerId = String(Bot.getProperty("owner_id") || "7127818616");27  var currentChatId = String(chat.chatid);28 29  if ((currentChatId !== ownerId && !Bot.getProperty("co_admin_" + String(currentChatId)))) {30    Bot.sendMessage("❌ Sirf Owner hi yeh setting badal sakta hai!");31    return;32  }33 34  // Reopening this screen cancels any half-finished wizard.35  User.setProperty("wz_state", null, "json");36 37  var botUser = String(Bot.getProperty("bot_username") || "JASSMODZSHOP_BOT").replace(/^@/, "");38  var adminUser = String(Bot.getProperty("admin_username") || "").replace(/^@/, "");39  if (!adminUser) {40    var sl = String(Bot.getProperty("support_link") || "");41    var m = sl.match(/t\.me\/([A-Za-z0-9_]{5,32})/i);42    if (m) adminUser = m[1];43  }44 45  var text =46    "<blockquote><tg-emoji emoji-id='6102856637343600044'>🪪</tg-emoji> <b>BOT IDENTITY SETTINGS</b></blockquote>\n\n" +47    "• <b>User ID (Owner):</b> <code>" + ownerId + "</code>\n" +48    "• <b>Bot Username:</b> <code>@" + botUser + "</code>\n" +49    "• <b>Admin Username:</b> " + (adminUser ? "<code>@" + adminUser + "</code>" : "<i>Not set</i>") + "\n\n" +50    "🔗 <b>Referral link:</b>\n<code>https://t.me/JASSMODZSHOP_BOT?start=_tgr_uXY38UUxODY9</code>\n\n" +51    "<i>Jo badalna hai uska button dabayein, phir bot ek-ek karke poochega.</i>";52 53  var keyboard = {54    inline_keyboard: [55      [{ text: "Set User ID", callback_data: "/wz go transfer", style: "danger", icon_custom_emoji_id: "6215386799133433653" }],56      [{ text: "Set Bot Username", callback_data: "/wz go idb", style: "primary", icon_custom_emoji_id: "6041705726206808304" }],57      [{ text: "Set Admin Username", callback_data: "/wz go ida", style: "success", icon_custom_emoji_id: "6267129592998270736" }],58      [{ text: "Back to Admin", callback_data: "/admin", style: "danger" }]59    ]60  };61 62  var cb = request && request.callback_query ? request.callback_query : null;63  var queryId = request ? (request.id || (cb && cb.id)) : null;64  var msgId = (request && request.message && request.message.message_id) ? request.message.message_id : (cb && cb.message ? cb.message.message_id : null);65 66  if (queryId) { try { Api.answerCallbackQuery({ callback_query_id: String(queryId) }); } catch (e) {} }67 68  var sent = false;69  if (msgId) {70    try {71      Api.editMessageText({72        chat_id: currentChatId, message_id: Number(msgId), text: text,73        parse_mode: "HTML", reply_markup: JSON.stringify(keyboard)74      });75      sent = true;76    } catch (e2) {}77  }78  if (!sent) {79    Api.sendMessage({ chat_id: currentChatId, text: text, parse_mode: "HTML", reply_markup: JSON.stringify(keyboard) });80  }81} catch (err) {82  Bot.sendMessage("⚠️ Error: " + err.message);83}
commands/_bot_identity.js · tarunpoonia905/OfcDevShopBot · TeleDevs