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/_confirm_ownership_transfer.js
javascript · 46 lines
1/**#command2name: /confirm_ownership_transfer3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 var ownerId = Bot.getProperty("owner_id") || "8875810358";14 var currentChatId = String(chat.chatid);15 16 if (currentChatId !== ownerId) {17 Bot.sendMessage("❌ Restricted!");18 return;19 }20 21 var newOwnerId = User.getProperty("pending_ownership_transfer_to");22 if (!newOwnerId) {23 Bot.sendMessage("❌ Koi pending transfer nahi mila. /transfer_ownership USERID phir se try karein.");24 return;25 }26 27 Bot.setProperty("owner_id", newOwnerId, "string");28 User.setProperty("pending_ownership_transfer_to", null, "string");29 30 Api.sendMessage({31 chat_id: chat.chatid,32 text: "<blockquote>✅ <b>OWNERSHIP TRANSFERRED!</b></blockquote>\n\nNaya Owner: <code>" + newOwnerId + "</code>",33 parse_mode: "HTML"34 });35 36 try {37 Api.sendMessage({38 chat_id: newOwnerId,39 text: "<blockquote>👑 <b>YOU ARE NOW THE OWNER OF THIS STORE!</b></blockquote>\n\n<i>Full admin panel access ke liye /admin command use karein.</i>",40 parse_mode: "HTML"41 });42 } catch (e) {}43 44} catch (err) {45 Bot.sendMessage("⚠️ Error: " + err.message);46}