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

Commercecommercedigital-goodsstars-paymentreseller-systemadmin-panelstock-management
ProfileTelegram
119 commands0 envUpdated 15d agoCreated Aug 23, 2026
Back to folder

commands/_cancel_order.js

javascript · 54 lines

Raw
1/**#command2name: /cancel_order3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13  var userId = user.telegramid;14 15  Api.deleteMessage({16    chat_id: chat.chatid,17    message_id: request.message.message_id18  });19 20  User.setProperty("pending_order_id", null);21  User.setProperty("pending_pay_amount", null);22 23  // ✅ Expiry-watcher ko disable karo taaki baad mein galat message edit na ho24  Bot.setProperty("qr_order_id_" + userId, null, "string");25  User.setProperty("qr_order_id_" + userId, null, "string");26  Bot.setProperty("qr_watch_order_" + userId, null, "string");27  User.setProperty("qr_watch_order_" + userId, null, "string");28  Bot.setProperty("verifying_lock_" + userId, false, "boolean");29  User.setProperty("verifying_lock_" + userId, false, "boolean");30 31  var cancelMsg = "✖ <tg-emoji emoji-id='6082547652556233400'>❌</tg-emoji> <b>ORDER CANCELLED</b>\n" +32                  "━━━━━━━━━━━━━━━━━━━━━━\n" +33                  "<i>Your payment request has been cancelled successfully.</i>";34 35  Api.sendMessage({36    chat_id: chat.chatid,37    text: cancelMsg,38    parse_mode: "HTML",39    reply_markup: JSON.stringify({40      inline_keyboard: [[41        { text: "Back to Menu", callback_data: "/back", style: "primary", icon_custom_emoji_id: "6057415823222379852" }42      ]]43    })44  });45 46  Api.answerCallbackQuery({47    callback_query_id: request.id,48    text: "Order Cancelled",49    show_alert: false50  });51 52} catch (err) {53  Bot.sendMessage("✖ <b>Order Cancelled.</b>", { parse_mode: "HTML" });54}