kkapil9112/Hguuuuuv45botPublic · Bot Template
AITelegram commerce bot for an admin-managed digital store: admins create categories, products, time-based plans, stock entries and license keys, and can grant reseller roles or adjust user balances. End users can view their balance, start a deposit flow with an inline amount keypad, apply coupon codes, and navigate back to the store menu. It uses Bot properties for product/stock/coupon data and Libs.ResourcesLib for per-user balances.
Commercecommerceshopreselleradmin-panelbalanceproduct-management
102 commands0 envUpdated 29d agoCreated Aug 7, 2026
commands/_cancel_plan_buy.js
javascript · 53 lines
1/**#command2name: /cancel_plan_buy3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// ❌ Cancel button on the "Confirm Your Purchase" screen14// =========================================================15 16try {17 var chatId = chat.chatid;18 19 var cancelText =20 "<blockquote>" +21 "<tg-emoji emoji-id='6219547832169273793'>❌</tg-emoji> <b>PURCHASE CANCELLED</b>\n" +22 "━━━━━━━━━━━━━━━━━━━━━\n" +23 "<tg-emoji emoji-id='6266994443262367483'>😊</tg-emoji> <i>Koi baat nahi, jab chaho phir se shop se buy kar sakte ho.</i>" +24 "</blockquote>";25 26 var buttons = [[27 { text: "Shop Menu", callback_data: "/buy_hack", style: "success", icon_custom_emoji_id: "5330237710655306682" }28 ]];29 30 if (request && request.message) {31 try {32 Api.editMessageText({33 chat_id: String(chatId),34 message_id: Number(request.message.message_id),35 text: cancelText,36 parse_mode: "HTML",37 reply_markup: JSON.stringify({ inline_keyboard: buttons })38 });39 } catch (e) {40 Api.sendMessage({ chat_id: chatId, text: cancelText, parse_mode: "HTML", reply_markup: JSON.stringify({ inline_keyboard: buttons }) });41 }42 } else {43 Api.sendMessage({ chat_id: chatId, text: cancelText, parse_mode: "HTML", reply_markup: JSON.stringify({ inline_keyboard: buttons }) });44 }45 46 var queryId = request ? (request.id || (request.callback_query && request.callback_query.id)) : null;47 if (queryId) {48 try { Api.answerCallbackQuery({ callback_query_id: String(queryId) }); } catch (e) {}49 }50 51} catch (e) {52 Bot.sendMessage("⚠️ Error: " + e.message);53}