indrajitghosh20006/Testseller_01botPublic · Bot Template

ProfileTelegram

AIThis bot provides an admin‑controlled system for managing user balances, products, and reseller roles. It includes commands to add balances (via manual input, Binance Pay, or UPI), approve and credit payments, and set up product listings with categories and pricing. Admins can also add resellers, view reseller info, and manage stock entries. The bot uses built‑in TeleBotHost APIs such as Bot, Api, HTTP, and Libs for database operations and message handling.

Commerceadminbalanceproductresellerpaymentsbinance
138 commands0 envUpdated 17h agoCreated Sep 27, 2026
Back to folder

commands/_apidelete.js

javascript · 20 lines

Raw
1/**#command2name: /apidelete3answer: 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>/apidelete API_ID</code>",{parse_mode:"HTML"});return;}17  if(Bot.getProperty("active_reseller_api")===id){Bot.sendMessage("❌ Active API ko pehle <code>/apiset OTHER_ID</code> se change karein.",{parse_mode:"HTML"});return;}18  delete reg[id]; Bot.setProperty("api_registry",reg,"json");19  Bot.sendMessage("✅ API <code>"+id+"</code> removed.",{parse_mode:"HTML"});20} catch(e){Bot.sendMessage("⚠️ API Delete Error: "+e.message);}