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/_cancel_topup.js
javascript Β· 102 lines
1/**#command2name: /cancel_topup3answer: 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 var userId = user.telegramid;55 var callbackId = request ? request.id : (request.callback_query && request.callback_query.id);56 57 var qrMsgId = Bot.getProperty("qr_msg_id_" + userId) || User.getProperty("qr_msg_id_" + userId) || (request.message ? request.message.message_id : null);58 59 if (qrMsgId) {60 try { Api.deleteMessage({ chat_id: chat.chatid, message_id: qrMsgId }); } catch (e) {}61 }62 63 User.setProperty("pending_order_id", null);64 User.setProperty("deposit_amount", "0", "string");65 Bot.setProperty("qr_msg_id_" + userId, null, "string");66 User.setProperty("qr_msg_id_" + userId, null, "string");67 Bot.setProperty("qr_caption_" + userId, null, "string");68 User.setProperty("qr_caption_" + userId, null, "string");69 Bot.setProperty("qr_buttons_" + userId, null, "string");70 User.setProperty("qr_buttons_" + userId, null, "string");71 Bot.setProperty("qr_order_id_" + userId, null, "string");72 User.setProperty("qr_order_id_" + userId, null, "string");73 74 // β
Expiry-watcher ko disable karo taaki baad mein galat message edit na ho75 Bot.setProperty("qr_watch_order_" + userId, null, "string");76 User.setProperty("qr_watch_order_" + userId, null, "string");77 Bot.setProperty("verifying_lock_" + userId, false, "boolean");78 User.setProperty("verifying_lock_" + userId, false, "boolean");79 80 var cancelText = "<blockquote>" +81 "<tg-emoji emoji-id='6219547832169273793'>β</tg-emoji> <b>Order Cancelled</b>\n" +82 "<tg-emoji emoji-id='6266994443262367483'>π</tg-emoji> <i>Koi baat nahi, jab chaho phir se wallet me balance add kar sakte ho.</i>" +83 "</blockquote>";84 85 Api.sendMessage({86 chat_id: chat.chatid,87 text: cancelText,88 parse_mode: "HTML",89 reply_markup: JSON.stringify({90 inline_keyboard: [[91 { text: "Back to Menu", callback_data: "/back", style: "primary", icon_custom_emoji_id: "6057415823222379852" }92 ]]93 })94 });95 96 if (callbackId) {97 Api.answerCallbackQuery({ callback_query_id: String(callbackId) });98 }99 100} catch (err) {101 Bot.sendMessage("β οΈ System Error: " + err.message);102}