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/_setbtn.js
javascript · 48 lines
1/**#command2name: /setbtn3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 var adminId = String(Bot.getProperty("owner_id") || Bot.getProperty("admin_id") || "8477746023");14 var userId = String(user.telegramid);15 var isCoAdmin = Bot.getProperty("co_admin_" + userId) === true;16 if (userId !== adminId && !isCoAdmin) {17 Bot.sendMessage("❌ Only admin can use this command.");18 return;19 }20 21 var raw = (typeof params !== "undefined" && params) ? String(params).trim() : "";22 if (!raw || raw.indexOf(" ") === -1) {23 Bot.sendMessage(24 "⚠️ <b>Format:</b>\n" +25 "<code>/setbtn buy 🟢 🛒 Kharidein</code>\n" +26 "<code>/setbtn bal 🟡 💰 Check Balance</code>\n" +27 "<code>/setbtn addbal 🔵 ➕ Deposit</code>\n" +28 "<code>/setbtn support ⚪ 📞 Help</code>",29 {parse_mode:"HTML"}30 );31 return;32 }33 34 var firstSpace = raw.indexOf(" ");35 var type = raw.substring(0, firstSpace).toLowerCase();36 var label = raw.substring(firstSpace + 1).trim();37 38 var map = {buy:"buy", bal:"bal", addbal:"addbal", support:"support"};39 if (!map[type] || !label) {40 Bot.sendMessage("❌ Type sirf: buy, bal, addbal, support");41 return;42 }43 44 Bot.setProperty("btn_label_" + map[type], label, "string");45 Bot.sendMessage("✅ <b>" + type + "</b> button label updated:\n" + label, {parse_mode:"HTML"});46} catch (e) {47 Bot.sendMessage("❌ Set button error: " + e.message);48}