indrajitghosh20006/Igstore_01botPublic Β· Bot Template
AIThe bot provides an admin interface for a digital store, allowing the owner or coβadmins to add balances, products, plans, and categories. It supports payment workflows via UPI and Binance Pay, automatically generating QR codes and handling manual approval of deposits. The code patches inline keyboards to use premium emoji icons and includes helper functions for user and bot properties. Overall, it serves as a commerce management tool for a Telegram-based storefront.
Commercestoreadminbalanceproductplancategory
170 commands0 envUpdated 7h agoCreated Oct 30, 2026
commands/_reseller.js
javascript Β· 124 lines
1/**#command2name: /reseller3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// PREMIUM BUTTON ICONS13(function(){14 try {15 if (!JSON.__premiumPatched) {16 var __origStringify = JSON.stringify;17 JSON.stringify = function(value, replacer, space) {18 try {19 if (value && value.inline_keyboard && Array.isArray(value.inline_keyboard)) {20 var premiumIds = [21 "6143444134125379822",22 "6091379307907652768",23 "6147534454819661264",24 "6147817325660741985",25 "6235683689292897318",26 "6102856637343600044"27 ];28 var rows = value.inline_keyboard.map(function(row, ri) {29 if (!Array.isArray(row)) return row;30 return row.map(function(btn, bi) {31 if (!btn || typeof btn !== "object") return btn;32 var copy = {};33 for (var k in btn) copy[k] = btn[k];34 if (!copy.icon_custom_emoji_id) copy.icon_custom_emoji_id = premiumIds[(ri + bi) % premiumIds.length];35 return copy;36 });37 });38 var cloned = {};39 for (var key in value) cloned[key] = value[key];40 cloned.inline_keyboard = rows;41 return __origStringify.call(JSON, cloned, replacer, space);42 }43 } catch (e) {}44 return __origStringify.call(JSON, value, replacer, space);45 };46 JSON.__premiumPatched = true;47 }48 } catch (e) {}49})();50 51/**#command52name: /reseller53answer: 54keyboard: 55parse_mode: markdown56aliases: 57allow_only_group: false58need_reply: false59case_insensitive: false60is_web: 061#command**/62 63try {64 if (request && request.id) {65 HTTP.post({66 url: "https://api.telegram.org/bot" + bot.token + "/answerCallbackQuery",67 body: { callback_query_id: request.id }68 });69 }70 71 // β‘ DYNAMIC PRICE FETCH: Agar koi price set nahi hai toh default 450 dikhega72 let price = Bot.getProperty("reseller_price") || 70;73 74 let text = "ββββββββββββββββββββ\n" +75 "<tg-emoji emoji-id='6195245249351129913'>π</tg-emoji> <b>UPGRADE TO RESELLER</b>\n" +76 "ββββββββββββββββββββ\n\n" +77 "<blockquote>" +78 "<tg-emoji emoji-id='6193006377389005214'>π</tg-emoji> <b>Benefits:</b>\n" +79 "β’ Special reseller prices on ALL products\n" +80 "β’ Priority support\n" +81 "β’ Balance tracking dashboard\n\n" +82 "<tg-emoji emoji-id='6195222374355311655'>β</tg-emoji> <b>One-time Investment:</b> βΉ" + price + "\n\n" +83 "<tg-emoji emoji-id='6194966974125055544'>β οΈ</tg-emoji> <b>Terms:</b>\n" +84 "β’ Generate at least 1 license every 30 days\n" +85 "β’ Inactive for 30+ days β automatic downgrade\n" +86 "β’ You can re-upgrade anytime by paying again\n\n" +87 "Ready to upgrade? <tg-emoji emoji-id='6194922667242429131'>π</tg-emoji>" +88 "</blockquote>";89 90 let keyboard = {91 inline_keyboard: [92 [93 {94 text: "Upgrade Now",95 callback_data: "/reseller_upgrade",96 style: "success", 97 icon_custom_emoji_id: "6195245249351129913"98 },99 {100 text: "Back",101 callback_data: "/back", 102 style: "danger", 103 icon_custom_emoji_id: "5893163582194978381"104 }105 ]106 ]107 };108 109 let endpoint = (request && request.message) ? "editMessageText" : "sendMessage";110 let requestBody = {111 chat_id: chat.chatid,112 text: text,113 parse_mode: "HTML",114 reply_markup: JSON.stringify(keyboard)115 };116 117 if (endpoint === "editMessageText") requestBody.message_id = request.message.message_id;118 119 HTTP.post({120 url: "https://api.telegram.org/bot" + bot.token + "/" + endpoint,121 body: requestBody122 });123 124} catch (err) {}