indrajitghosh20006/HgfhhuybotPublic · Bot Template

ProfileTelegram

AIThis bot provides a command‑based admin interface for managing user balances, products, and resellers. It supports adding balances via UPI or Binance Pay, approving payments, and configuring product details and categories. The bot also handles user role changes, stock uploads, and offers a simple calculator UI for entering amounts. All interactions are handled through short commands and inline keyboards, with no long‑running listeners or external frameworks.

Utilityadminbalanceproductresellerpaymentupi
138 commands0 envUpdated 15h agoCreated Sep 27, 2026
Back to folder

commands/_set_proof_link_btn.js

javascript · 60 lines

Raw
1/**#command2name: /set_proof_link_btn3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// ✅ ADMIN PANEL BUTTON — "Set Payment Proof Link"14// Pressing this button prompts the admin to send the new payment-proof15// channel/group link as a normal text message next; _start.js (MODULE 5)16// auto-captures that reply and forwards it to /set_proof_link internally.17// =========================================================18 19try {20  var adminId = Bot.getProperty("owner_id") || "7839151435";21  var currentChatId = String(chat.chatid);22  var isCoAdmin = Bot.getProperty("co_admin_" + currentChatId);23 24  if (currentChatId !== adminId && !isCoAdmin) {25    Bot.sendMessage("❌ You are not authorized to use this.");26    return;27  }28 29  var currentLink = Bot.getProperty("payment_proof_link") || "https://t.me/DevModz_Proof (default)";30 31  User.setProperty("set_proof_link_step", "waiting_input", "string");32 33  var promptText =34    "<blockquote><tg-emoji emoji-id='5330237710655306682'>✅</tg-emoji> <b>Set Payment Proofs Link</b></blockquote>\n\n" +35    "<i>Naya link (http/https) bhejein jo 'Payment Proofs' button pe khulega.</i>\n\n" +36    "<b>Current link:</b> " + currentLink;37 38  var queryId = request ? (request.id || (request.callback_query && request.callback_query.id)) : null;39 40  if (request && request.message && request.message.message_id) {41    try {42      Api.editMessageText({43        chat_id: String(chat.chatid),44        message_id: Number(request.message.message_id),45        text: promptText,46        parse_mode: "HTML",47        reply_markup: JSON.stringify({ inline_keyboard: [[{ text: "Cancel", callback_data: "/admin", style: "danger" }]] })48      });49    } catch (e) {50      Api.sendMessage({ chat_id: chat.chatid, text: promptText, parse_mode: "HTML" });51    }52  } else {53    Bot.sendMessage(promptText, { parse_mode: "HTML" });54  }55 56  if (queryId) { try { Api.answerCallbackQuery({ callback_query_id: String(queryId) }); } catch (e) {} }57 58} catch (err) {59  Bot.sendMessage("⚠️ Error: " + err.message);60}