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 8h agoCreated Oct 30, 2026
commands/_onWebKeyError.js
javascript Β· 89 lines
1/**#command2name: /onWebKeyError3answer: 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 53var dataOptions = options;54var chatId = dataOptions ? dataOptions.chat_id : chat.chatid;55var adminId = "7839151435";56 57var systemErrorText = "<blockquote>" +58 "β <b>ORDER FAILED</b>\n" +59 "βββββββββββββββββββββ\n\n" +60 "β οΈ <b>Something went wrong. Please retry soon.</b>\n\n" +61 "β³ <i>Wait some time, admin will stock refill soon.</i>\n" +62 "π° <b>Status:</b> Your funds were not deducted.\n\n" +63 "βββββββββββββββββββββ\n" +64 "π£ <i>Feel free to check back in a few minutes!</i>" +65 "</blockquote>";66 67var errorInlineButtons = [[68 { text: "Back to Menu", callback_data: "/back" }69]];70 71// β
FIX: sendMessage use kiya (photo message pe editMessageText fail hoti hai)72Api.sendMessage({73 chat_id: String(chatId),74 text: systemErrorText,75 parse_mode: "HTML",76 reply_markup: JSON.stringify({ inline_keyboard: errorInlineButtons })77});78 79if (dataOptions) {80 var adminAlertText = "β οΈ <b>API Reseller Error Alert!</b>\n" +81 "βββββββββββββββββββββ\n" +82 "π€ <b>User:</b> " + (dataOptions.first_name || "Unknown") + " (<code>" + dataOptions.user_id + "</code>)\n" +83 "π¦ <b>Product:</b> <code>" + dataOptions.prod_name + "</code>\n" +84 "β³ <b>Plan:</b> <code>" + dataOptions.plan_days + " Days</code>\n" +85 "π΅ <b>Price Amount:</b> βΉ" + Number(dataOptions.price).toFixed(2) + "\n" +86 "π¨ <b>Reason:</b> External Website API is down or connection timed out.";87 88 Bot.sendMessageToChatWithId(adminId, adminAlertText);89}