yaainnnxitstore/YASIN_XIT_BOTPublic · Bot Template

ProfileTelegram

AIYASIN XIT FREE KEY appears to be a Telegram automation bot. Commands include /menu, /addfund, /confirm_buyitem, /rembal, /sendorderkey_input, /removeproduct, /add_reseller, /addkey. Observed in code: messaging, keyboards, payments, games, libs, web.

Utilityutility
140 commands0 envUpdated 1mo agoCreated Sep 11, 2026
Back to folder

commands/_topupmethod.js

javascript · 123 lines

Raw
1/**#command2name: /topupmethod3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12function __esc(v){return String(v==null?"":v).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");}13var __swfUpdate = (typeof update !== "undefined" && update) ? update : null;14var __swfCb = (__swfUpdate && __swfUpdate.callback_query) ? __swfUpdate.callback_query : null;15var __swfCbMsg = (__swfCb && __swfCb.message) ? __swfCb.message : null;16var __swfMsgId = __swfCbMsg && __swfCbMsg.message_id ? Number(__swfCbMsg.message_id) : 0;17var __swfCbId = __swfCb && __swfCb.id ? String(__swfCb.id) : "";18try {19  if (typeof request !== "undefined" && request && __swfCb) {20    if (__swfCb.message) request.message = __swfCb.message;21    if (!request.id && __swfCb.id) request.id = __swfCb.id;22  }23} catch(__swf_norm_err) {}24function __swfEditMessage(a) {25  a = a || {};26  var mid = Number(a.message_id || __swfMsgId || 0);27  var cid = a.chat_id || (typeof chat !== "undefined" && chat ? (chat.id || chat.chatid) : null);28  if (!mid || !cid) throw new Error("Callback message ID not found");29  var markup = a.reply_markup;30  if (typeof markup === "string") { try { markup = JSON.parse(markup); } catch(_) {} }31  var base = {chat_id:cid,message_id:mid,parse_mode:a.parse_mode,reply_markup:markup};32  var cm = __swfCbMsg;33  if (cm && (cm.photo || cm.video || cm.document || cm.audio || cm.animation)) {34    return Api.editMessageCaption({chat_id:cid,message_id:mid,caption:String(a.text == null ? "" : a.text),parse_mode:a.parse_mode,reply_markup:markup});35  }36  return Api.editMessageText({chat_id:cid,message_id:mid,text:String(a.text == null ? "" : a.text),parse_mode:a.parse_mode,reply_markup:markup});37}38function __uiSend(text, opts) {39  opts = opts || {};40  var req = (typeof request !== "undefined" && request) ? request : null;41  var chatId = (typeof chat !== "undefined" && chat && chat.chatid) ? chat.chatid : null;42  var isCallback = !!__swfCb;43  var mid = 0;44  if (isCallback && update.callback_query.message && update.callback_query.message.message_id) mid = Number(update.callback_query.message.message_id);45  if (!mid) { try { mid = Number(User.getProperty("pending_menu_message_id") || User.getProperty("main_menu_message_id") || User.getProperty("support_message_id") || 0); } catch(e0) { mid = 0; } }46  var markup = opts.reply_markup;47  if (markup && typeof markup !== "string") { try { markup = JSON.stringify(markup); } catch(e1) {} }48  var textValue = String(text == null ? "" : text);49  if (mid && chatId) {50    try {51      __swfEditMessage({chat_id:chatId,message_id:mid,text:textValue,parse_mode:opts.parse_mode,reply_markup:markup});52      try { User.setProperty("main_menu_message_id",String(mid),"string"); User.setProperty("pending_menu_message_id",String(mid),"string"); } catch(se) {}53      return true;54    } catch(e2) {55      var s=String(e2).toLowerCase();56      if(s.indexOf("message is not modified")>=0 || s.indexOf("not modified")>=0) return true;57      if(isCallback && update.callback_query.message && update.callback_query.message.photo) {58        try { Api.editMessageCaption({chat_id:chatId,message_id:mid,caption:textValue,parse_mode:opts.parse_mode,reply_markup:markup}); return true; } catch(e3) {59          var s3=String(e3).toLowerCase(); if(s3.indexOf("not modified")>=0) return true;60        }61      }62      if(isCallback) { try { Api.answerCallbackQuery({callback_query_id:String(update.callback_query.id),text:"⚠️ Could not update the screen.",show_alert:true}); } catch(e4) {} return false; }63    }64  }65  if (isCallback) { try { Api.answerCallbackQuery({callback_query_id:String(update.callback_query.id),text:"⚠️ Screen message not found.",show_alert:true}); } catch(e5) {} return false; }66  try {67    var sent=Api.sendMessage({chat_id:chatId,text:textValue,parse_mode:opts.parse_mode,reply_markup:markup});68    try { if(sent&&sent.message_id){User.setProperty("pending_menu_message_id",String(sent.message_id),"string");User.setProperty("main_menu_message_id",String(sent.message_id),"string");} } catch(e6) {}69    return true;70  } catch(e7) { return false; }71}72try {73  if (Bot.getProperty("banned_" + String(user.telegramid)) === true && String(user.telegramid) !== String(Bot.getProperty("owner_id")||"8225479428")) {74    __uiSend("🚫 <b>ACCESS DENIED</b>\n\nYour account has been suspended by the administrator.",{parse_mode:"HTML"});75    return;76  }77  var parts=String(params||"").trim().split(/\s+/);78  var method=String(parts[0]||"").toLowerCase();79  var presetVal=Number(parts[1]);80  var rate=1; // 1 USDT = $1.00 (fixed)81  if(method!=="binance"){Bot.runCommand("/addfund");return;}82  if(!isFinite(presetVal)||presetVal<1||presetVal>50){Bot.runCommand("/addfund");return;}83  var payId=String(Bot.getProperty("binance_pay_id")||"").trim();84  if(!payId){__uiSend("\u26A0\uFE0F <b>Payments are not configured yet.</b>\n\nPlease contact the administrator.",{parse_mode:"HTML"});return;}85  var usdt=presetVal.toFixed(2);86  var amount=Math.round(presetVal*100)/100;87  User.setProperty("pending_pay_amount",amount,"number");88  User.setProperty("deposit_amount",String(amount),"string");89  User.setProperty("deposit_method","binance","string");90  User.setProperty("manual_payment_expires_at",Date.now()+600000,"number");91  User.setProperty("payment_session_expires_at",Date.now()+600000,"number");92  var depId="DEP_"+Date.now()+"_"+Math.floor(Math.random()*100000);93  var commonRec={id:depId,user_id:String(user.telegramid),name:(((user.first_name||"")+(user.last_name?" "+user.last_name:""))).trim()||"User",username:user.username?String(user.username):"None",amount:Number(amount),usdt_amount:Number(usdt),try_amount:Number(amount),rate:rate,currency:"USD",method:"binance",status:"pending",created_at:new Date().toISOString(),expires_at:Date.now()+600000};94  Bot.setProperty("manual_payment_"+depId,commonRec,"json");95  var pendingDeps=Bot.getProperty("pending_manual_payments")||[]; if(Array.isArray(pendingDeps))pendingDeps=pendingDeps.slice(); if(!Array.isArray(pendingDeps)) pendingDeps=[]; if(pendingDeps.indexOf(depId)<0) pendingDeps.push(depId); Bot.setProperty("pending_manual_payments",pendingDeps,"json");96  User.setProperty("active_deposit_id",depId,"string");97  User.setProperty("awaiting_binance_txid",false,"boolean");98  var text="\uD83D\uDFE1 <b>ADD FUNDS \u2014 BINANCE PAY</b>\n\n"+99    "\u251C \uD83D\uDC8E Amount: <b>"+usdt+" USDT</b>\n"+100    "\u251C \uD83D\uDCB1 Rate: <b>1 USDT = $1.00</b>\n"+101    "\u2514 \uD83C\uDD94 Deposit ID: <code>"+depId+"</code>\n\n"+102    "\uD83D\uDCB0 <b>Send Payment To:</b>\n\n"+103    "\uD83D\uDFE1 Binance Pay ID: <code>"+payId+"</code>\n\n"+104    "\uD83D\uDCF1 <b>How To Pay</b>\n\n"+105    "\u251C 1\uFE0F\u20E3 Open the Binance app \u2192 Pay\n"+106    "\u251C 2\uFE0F\u20E3 Send <b>"+usdt+" USDT</b> to the Pay ID above\n"+107    "\u251C 3\uFE0F\u20E3 Copy your Pay Order ID\n"+108    "\u2514 4\uFE0F\u20E3 Tap the button below and send that ID\n\n"+109    "\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n"+110    "\u251C \u23F0 Complete the payment within 10 minutes\n"+111    "\u2514 \u2705 Your balance is credited once an admin approves it\n"+112    "\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501";113  var kb={inline_keyboard:[[{text:"\uD83D\uDFE1 I Have Paid \u2014 Verify",callback_data:"/topuptxid"}],[{text:"\uD83D\uDD19 Back",callback_data:"/addfund"}]]};114  var req=(typeof request!=="undefined"&&request)?request:null;115  if(__swfCb&&update.callback_query.message){116    User.setProperty("payment_menu_message_id",String(update.callback_query.message.message_id),"string");117    try { __swfEditMessage({chat_id:chat.chatid,message_id:update.callback_query.message.message_id,text:text,parse_mode:"HTML",reply_markup:JSON.stringify(kb)}); }118    catch(eEdit) { try{Api.answerCallbackQuery({callback_query_id:update.callback_query.id,text:"\u26A0\uFE0F Could not refresh the payment screen.",show_alert:true});}catch(ea){} return; }119    try{Api.answerCallbackQuery({callback_query_id:update.callback_query.id});}catch(e){}120  } else {121    __uiSend(text,{parse_mode:"HTML",reply_markup:JSON.stringify(kb)});122  }123} catch(e){__uiSend("\u26A0\uFE0F Could not open the payment method. Please try again.");}