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
commands/_cancel_ownership_transfer.js
javascript · 45 lines
1/**#command2name: /cancel_ownership_transfer3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// ❌ Cancel button on the Ownership Transfer confirmation screen14// ✅ BUG FIX: pehle ye button /cancel_plan_buy (galat context — "Purchase15// Cancelled" dikhata tha) use karta tha, aur pending transfer state clear16// bhi nahi hoti thi — matlab kabhi galti se "Confirm Transfer" phir dabta17// to purani/stale transfer execute ho sakti thi. Ab dono fix hain.18// =========================================================19 20try {21 User.setProperty("pending_ownership_transfer_to", null, "string");22 23 var text = "<blockquote>❌ <b>OWNERSHIP TRANSFER CANCELLED</b></blockquote>\n\n<i>Kuch bhi change nahi hua, aap abhi bhi Owner hain.</i>";24 25 if (request && request.message) {26 try {27 Api.editMessageText({28 chat_id: String(chat.chatid),29 message_id: Number(request.message.message_id),30 text: text,31 parse_mode: "HTML"32 });33 } catch (e) {34 Api.sendMessage({ chat_id: chat.chatid, text: text, parse_mode: "HTML" });35 }36 } else {37 Api.sendMessage({ chat_id: chat.chatid, text: text, parse_mode: "HTML" });38 }39 40 var queryId = request ? (request.id || (request.callback_query && request.callback_query.id)) : null;41 if (queryId) { try { Api.answerCallbackQuery({ callback_query_id: String(queryId) }); } catch (e) {} }42 43} catch (err) {44 Bot.sendMessage("⚠️ Error: " + err.message);45}