ayushyadav7970824760/goldensellingstore_botPublic · Bot Template
AIThis Telegram store bot lets customers browse digital products and plans, apply coupons, add funds via UPI, and receive purchased keys. It includes a full admin panel for managing products, reordering items, setting reseller prices, viewing and removing key stock, configuring UPI payment details and update links, and checking user balances. Co-admins and resellers are supported, and support tickets are forwarded to the admin.
Commercedigital_storeadmin_panelupi_paymentsresellercouponskey_stock
146 commands0 envUpdated 2d agoCreated Sep 5, 2026
commands/_transfer_ownership.js
javascript · 65 lines
1/**#command2name: /transfer_ownership3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 👑 OWNER-ONLY — Transfer Ownership14// Usage: /transfer_ownership USERID15// ⚠️ IMPORTANT LIMITATION: this updates the dynamic "owner_id" property that16// NEW commands (admin panel, coupon, co-admin, maintenance) check. Older17// admin-only commands in this bot (addproduct, addkey, addbal, etc.) still18// have the original owner ID hardcoded as literal text in ~30 files — those19// would need a separate one-time refactor to fully recognize a new owner too.20// =========================================================21 22try {23 var ownerId = Bot.getProperty("owner_id") || "8477746023";24 var currentChatId = String(chat.chatid);25 26 if (currentChatId !== ownerId) {27 Bot.sendMessage("❌ Sirf current Owner hi ownership transfer kar sakta hai!");28 return;29 }30 31 if (!params || params.trim() === "") {32 Bot.sendMessage("⚠️ <b>Format:</b> <code>/transfer_ownership USERID</code>", { parse_mode: "HTML" });33 return;34 }35 36 var newOwnerId = params.trim();37 if (isNaN(Number(newOwnerId))) {38 Bot.sendMessage("❌ Valid numeric User ID chahiye!");39 return;40 }41 if (newOwnerId === ownerId) {42 Bot.sendMessage("❌ Ye to already aap hi hain!");43 return;44 }45 46 User.setProperty("pending_ownership_transfer_to", newOwnerId, "string");47 48 Api.sendMessage({49 chat_id: chat.chatid,50 text: "<blockquote>⚠️ <b>CONFIRM OWNERSHIP TRANSFER</b></blockquote>\n\n" +51 "Aap ownership <code>" + newOwnerId + "</code> ko transfer karne wale hain.\n" +52 "<b>Ye action turant apply hoga aur aap Owner nahi rahenge!</b>\n\n" +53 "<i>Kya aap sure hain?</i>",54 parse_mode: "HTML",55 reply_markup: JSON.stringify({56 inline_keyboard: [[57 { text: "Confirm Transfer", callback_data: "/confirm_ownership_transfer", style: "danger", icon_custom_emoji_id: "6215386799133433653" },58 { text: "Cancel", callback_data: "/cancel_ownership_transfer", style: "primary" }59 ]]60 })61 });62 63} catch (err) {64 Bot.sendMessage("⚠️ Error: " + err.message);65}