devbro468/Dev_x_store_botPublic · Bot Template

AIThis bot operates a digital storefront (DEV X STORE) selling subscription-based products — likely game hacks, accounts, or access keys — categorized by platform (Android Root, Non-Root, iPhone). It features a reseller program with discounted pricing, a dual-currency wallet (INR balance + Telegram Stars/XTR), and a full admin/co-admin panel for managing products, plans, per-plan pricing, stock (keys/accounts), coupons, and API endpoints. Purchases flow through a plan selection screen offering wallet payment, Stars invoices (sendInvoice with XTR currency), and coupon application. Successful Stars payments are handled via successful_payment webhook, crediting wallet or delivering keys directly. Admin tools include user listing with chunked messaging, stock viewing/deletion with inline keyboards, co-admin management, and API registry updates. The bot registers users on first interaction and

Commercecommercedigital-goodsstars-paymentreseller-systemadmin-panelstock-management
ProfileTelegram
119 commands0 envUpdated 15d agoCreated Aug 23, 2026
Back to folder

commands/_profile.js

javascript · 41 lines

Raw
1/**#command2name: /profile3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 👤 COMMAND = /profile  (Premium Profile — Step 1: fetch user's DP)14// ✅ BUG FIX: pehle ek separate "Loading your premium profile..." message15// bhejke uska ID save karke baad me delete karne ki koshish hoti thi — lekin16// ID capture kabhi-kabhi chained HTTP.get callback ke through reliably17// propagate nahi hota tha, isliye ye "Loading..." message hamesha stuck reh18// jaata tha. Fix: ab koi separate loading message bheja hi nahi jaata — seedha19// DP fetch hoke turant final profile aata hai (delay itna chhota hai ki20// loading indicator ki zarurat hi nahi).21// =========================================================22 23try {24  var userId = String(user.telegramid);25  var chatId = chat.chatid;26 27  // ✅ Purani menu message ko clean karke hatate hain (agar button click se aaya ho)28  if (request && request.message && request.message.message_id) {29    try { Api.deleteMessage({ chat_id: chatId, message_id: request.message.message_id }); } catch (e) {}30  }31 32  // 📸 User ki Telegram DP fetch karo — response async /onProfilePhoto par aayega33  HTTP.get({34    url: "https://api.telegram.org/bot" + bot.token + "/getUserProfilePhotos?user_id=" + userId + "&limit=1",35    success: "/onProfilePhoto",36    error: "/onProfilePhoto"37  });38 39} catch (err) {40  Bot.sendMessage("⚠️ Profile Error: " + err.message, { parse_mode: "HTML" });41}