ashoksarande3/ASHOK_HACK_STORE_BOTPublic · Bot Template
AIThis bot operates as a commercial storefront for selling Free Fire game hacks and cheats via UPI QR code payments. It features a dynamic pricing system with separate normal and reseller prices, product plans with flexible durations (days, hours, minutes), and a reseller program requiring a one-time upgrade fee. The bot handles payment verification through QR code generation and expiry tracking, user verification via Telegram contact sharing, and admin tools for stock management, plan creation, and ownership transfer. It includes a balance system, maintenance mode, and Telegram Stars payment fallback. The codebase uses TeleBotHost's TBL JavaScript APIs (Bot, Api, HTTP, db properties, Libs) for all logic.
commands/_cancel_topup.js
javascript · 61 lines
1/**#command2name: /cancel_topup3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 var userId = user.telegramid;14 var callbackId = request ? request.id : (request.callback_query && request.callback_query.id);15 16 var qrMsgId = Bot.getProperty("qr_msg_id_" + userId) || User.getProperty("qr_msg_id_" + userId) || (request.message ? request.message.message_id : null);17 18 if (qrMsgId) {19 try { Api.deleteMessage({ chat_id: chat.chatid, message_id: qrMsgId }); } catch (e) {}20 }21 22 User.setProperty("pending_order_id", null);23 User.setProperty("deposit_amount", "0", "string");24 Bot.setProperty("qr_msg_id_" + userId, null, "string");25 User.setProperty("qr_msg_id_" + userId, null, "string");26 Bot.setProperty("qr_caption_" + userId, null, "string");27 User.setProperty("qr_caption_" + userId, null, "string");28 Bot.setProperty("qr_buttons_" + userId, null, "string");29 User.setProperty("qr_buttons_" + userId, null, "string");30 Bot.setProperty("qr_order_id_" + userId, null, "string");31 User.setProperty("qr_order_id_" + userId, null, "string");32 33 // ✅ Expiry-watcher ko disable karo taaki baad mein galat message edit na ho34 Bot.setProperty("qr_watch_order_" + userId, null, "string");35 User.setProperty("qr_watch_order_" + userId, null, "string");36 Bot.setProperty("verifying_lock_" + userId, false, "boolean");37 User.setProperty("verifying_lock_" + userId, false, "boolean");38 39 var cancelText = "<blockquote>" +40 "<tg-emoji emoji-id='6219547832169273793'>❌</tg-emoji> <b>Order Cancelled</b>\n" +41 "<tg-emoji emoji-id='6266994443262367483'>😊</tg-emoji> <i>Koi baat nahi, jab chaho phir se wallet me balance add kar sakte ho.</i>" +42 "</blockquote>";43 44 Api.sendMessage({45 chat_id: chat.chatid,46 text: cancelText,47 parse_mode: "HTML",48 reply_markup: JSON.stringify({49 inline_keyboard: [[50 { text: "Back to Menu", callback_data: "/back", style: "primary", icon_custom_emoji_id: "6057415823222379852" }51 ]]52 })53 });54 55 if (callbackId) {56 Api.answerCallbackQuery({ callback_query_id: String(callbackId) });57 }58 59} catch (err) {60 Bot.sendMessage("⚠️ System Error: " + err.message);61}