devbro468/Dev_x_store_botPublic · Bot Template
AIThis bot operates a digital storefront (DEV X STORE) selling subscription-based products — likely game hacks, accounts, or access keys — categorized by platform (Android Root, Non-Root, iPhone). It features a reseller program with discounted pricing, a dual-currency wallet (INR balance + Telegram Stars/XTR), and a full admin/co-admin panel for managing products, plans, per-plan pricing, stock (keys/accounts), coupons, and API endpoints. Purchases flow through a plan selection screen offering wallet payment, Stars invoices (sendInvoice with XTR currency), and coupon application. Successful Stars payments are handled via successful_payment webhook, crediting wallet or delivering keys directly. Admin tools include user listing with chunked messaging, stock viewing/deletion with inline keyboards, co-admin management, and API registry updates. The bot registers users on first interaction and
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}