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/_apiset.js

javascript · 20 lines

Raw
1/**#command2name: /apiset3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13  var ownerId=String(Bot.getProperty("owner_id")||"7839151435"), uid=String(chat.chatid), co=Bot.getProperty("co_admin_"+uid);14  if(uid!==ownerId && !co) return;15  var id=params?String(params).trim():"", reg=Bot.getProperty("api_registry")||{};16  if(!id || !reg[id]){Bot.sendMessage("❌ Use <code>/apiset API_ID</code>",{parse_mode:"HTML"});return;}17  if(reg[id].enabled===false){Bot.sendMessage("❌ This API is disabled.");return;}18  Bot.setProperty("active_reseller_api",id,"string");19  Bot.sendMessage("✅ Active reseller API set to <code>"+id+"</code>\nAll external reseller purchases will use this API.",{parse_mode:"HTML"});20} catch(e){Bot.sendMessage("⚠️ API Set Error: "+e.message);}