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/_onDeepLinkPlanShow.js
javascript · 97 lines
1/**#command2name: /onDeepLinkPlanShow3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 var userId = user.telegramid;14 var chatId = User.getProperty("dl_wait_chatid") || chat.chatid;15 var loadingMsgId = User.getProperty("dl_wait_msgid");16 var matchedIdx = Number(User.getProperty("dl_wait_prodidx"));17 18 var productList = Bot.getProperty("stored_products") || [];19 var product = productList[matchedIdx];20 21 if (!product) {22 Bot.sendMessage("⚠️ Product data mismatch, dobara try karein.");23 return;24 }25 26 var isResellerDL = Bot.getProperty("is_reseller_" + userId) === true;27 var planButtons = [];28 var plans = product.plans || [];29 30 if (plans.length === 0) {31 plans = [32 { days: "1", normal_price: "79", reseller_price: "65" },33 { days: "7", normal_price: "350", reseller_price: "300" }34 ];35 }36 37 for (var j = 0; j < plans.length; j++) {38 var plan = plans[j];39 var cleanProdName = product.name.trim().toUpperCase();40 var cleanPlanDays = String(plan.days).replace(/[^0-9]/g, "").trim();41 42 var normalKey = "price_normal_" + cleanProdName + "_" + cleanPlanDays;43 var resellerKey = "price_reseller_" + cleanProdName + "_" + cleanPlanDays;44 45 var adminNormalPrice = Bot.getProperty(normalKey);46 var adminResellerPrice = Bot.getProperty(resellerKey);47 48 var currentNormal = (adminNormalPrice !== undefined && adminNormalPrice !== null) ? adminNormalPrice : plan.normal_price;49 var currentReseller = (adminResellerPrice !== undefined && adminResellerPrice !== null) ? adminResellerPrice : plan.reseller_price;50 51 var displayPrice = isResellerDL ? currentReseller : currentNormal;52 53 planButtons.push([{54 text: plan.days + " DAYS ➔ " + displayPrice + "₹",55 callback_data: "/buyitem " + matchedIdx + " " + j,56 style: "success",57 icon_custom_emoji_id: "5866053971960929280"58 }]);59 }60 61 planButtons.push([{62 text: "Back to Products",63 callback_data: "/buy_hack",64 style: "danger",65 }]);66 67 var productEmojiId = product.emoji || "6266967801580231067";68 69 var productDLMsg = "<blockquote><tg-emoji emoji-id='6102856637343600044'>👑</tg-emoji> <b>PRODUCT: " + product.name.toUpperCase() + "</b></blockquote>\n\n" +70 "<tg-emoji emoji-id='6093677128295914531'>✏️</tg-emoji> <b>CHOOSE YOUR PLAN</b> <tg-emoji emoji-id='6093677128295914531'>✏️</tg-emoji>\n\n" +71 "<blockquote><tg-emoji emoji-id='6093854128193152827'>🎉</tg-emoji> Select your validity plan below to proceed with the secure order <tg-emoji emoji-id='6091571559233755994'>👉</tg-emoji></blockquote>";72 73 if (loadingMsgId) {74 Api.editMessageText({75 chat_id: String(chatId),76 message_id: Number(loadingMsgId),77 text: productDLMsg,78 parse_mode: "HTML",79 reply_markup: JSON.stringify({ inline_keyboard: planButtons })80 });81 } else {82 Api.sendMessage({83 chat_id: String(chatId),84 text: productDLMsg,85 parse_mode: "HTML",86 reply_markup: JSON.stringify({ inline_keyboard: planButtons })87 });88 }89 90 // cleanup91 User.setProperty("dl_wait_msgid", null, "number");92 User.setProperty("dl_wait_prodidx", null, "number");93 User.setProperty("dl_wait_chatid", null, "string");94 95} catch (err) {96 Bot.sendMessage("⚠️ Delay Callback Error: " + err.message);97}