indrajitghosh20006/Igstore_01botPublic Β· Bot Template

ProfileTelegram

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
Back to folder

commands/_support.js

javascript Β· 113 lines

Raw
1/**#command2name: /support3answer: 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 52 53try {54  if (request && request.id) {55    HTTP.post({56      url: "https://api.telegram.org/bot" + bot.token + "/answerCallbackQuery",57      body: { callback_query_id: request.id }58    });59  }60 61  var chatId = chat.chatid;62  var messageId = request && request.message ? request.message.message_id : null;63 64  var text = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n" +65             "<tg-emoji emoji-id='6039605143601680423'>πŸ“ž</tg-emoji> <b>CUSTOMER SUPPORT CENTER</b>\n" +66             "━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n" +67             "<blockquote>" +68             "Welcome to our support desk. If you are facing any issues regarding keys, payments, or services, feel free to contact us.\n\n" +69             "Click the button below to get the admin contact link." +70             "</blockquote>";71 72  // βœ… FIXED: ab admin ka contact link Admin Panel se set kiya ja sakta hai73  // ("Set Support Link" button) β€” Bot.getProperty se dynamically load hota74  // hai, hardcoded username pe fix nahi rehta.75  var supportLink = Bot.getProperty("support_link") || "https://t.me/Rolex306";76 77  var keyboard = {78    inline_keyboard: [79      [80        {81          text: "Contact Admin",82          url: supportLink, 83          style: "primary", 84          icon_custom_emoji_id: "5346024644635804737" 85        }86      ],87      [88        {89          text: "Back",90          callback_data: "/back",91          style: "danger", 92          icon_custom_emoji_id: "5893163582194978381"93        }94      ]95    ]96  };97 98  var endpoint = messageId ? "editMessageText" : "sendMessage";99  var requestBody = {100    chat_id: String(chatId),101    text: text,102    parse_mode: "HTML",103    reply_markup: JSON.stringify(keyboard)104  };105 106  if (messageId) { requestBody.message_id = Number(messageId); }107 108  HTTP.post({109    url: "https://api.telegram.org/bot" + bot.token + "/" + endpoint,110    body: requestBody111  });112 113} catch (err) {}