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

javascript · 42 lines

Raw
1/**#command2name: /sendorderkey3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12(async function(){13  var cb=(typeof update!=="undefined"&&update)?update.callback_query:null;14  var m=cb&&cb.message?cb.message:null;15  var cid=chat&&(chat.id||chat.chatid);16  var uid=String(user.telegramid), ownerId=String(Bot.getProperty("owner_id")||"");17  if(uid!==ownerId && !Bot.getProperty("co_admin_"+uid)){ if(cb) try{await Api.answerCallbackQuery({callback_query_id:String(cb.id),text:"❌ You are not authorized.",show_alert:true})}catch(_){} else await Api.sendMessage({chat_id:cid,text:"❌ You are not authorized."}); return; }18  var raw=String((typeof params!=="undefined"&&params!=null)?params:" ").trim().replace(/^\/sendorderkey\s*/i,"").trim();19  if(!raw){ if(cb) try{await Api.answerCallbackQuery({callback_query_id:String(cb.id),text:"❌ Order ID not found.",show_alert:true})}catch(_){} return; }20  var order=Bot.getProperty("order_"+raw)||Bot.getProperty("manual_order_"+raw);21  if(!order||typeof order!=="object"){ if(cb) try{await Api.answerCallbackQuery({callback_query_id:String(cb.id),text:"❌ Order not found.",show_alert:true})}catch(_){} return; }22  if(String(order.status)==="delivered"){if(cb)try{await Api.answerCallbackQuery({callback_query_id:String(cb.id),text:"⚠️ This order has already been delivered.",show_alert:true})}catch(_){}return;}23  if(!order.user_id){if(cb)try{await Api.answerCallbackQuery({callback_query_id:String(cb.id),text:"❌ User ID not found.",show_alert:true})}catch(_){}return;}24  var esc=v=>String(v==null?"":v).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");25  var text="🔑 <b>SEND KEY</b>\n\nPlease send <b>only the key</b> as a single message.";26  var kb={inline_keyboard:[[{text:"❌ Cancel",callback_data:"/manual_orders"}]]};27  try{28    if(cb&&m&&m.message_id){29      if(m.photo||m.video||m.document||m.audio||m.animation) await Api.editMessageCaption({chat_id:cid,message_id:Number(m.message_id),caption:text,parse_mode:"HTML",reply_markup:kb});30      else await Api.editMessageText({chat_id:cid,message_id:Number(m.message_id),text:text,parse_mode:"HTML",reply_markup:kb});31      User.setProperty("key_delivery_message_id",String(m.message_id),"string");32    }33    User.setProperty("key_delivery_step","key","string");34    User.setProperty("key_delivery_order_id",raw,"string");35    User.setProperty("key_delivery_product",String(order.product_name||order.product||"Product"),"string");36    User.setProperty("key_delivery_duration",String(order.duration||order.durationDisplay||order.plan||"-"),"string");37    await Bot.runCommand("/sendorderkey_input");38    if(cb) try{await Api.answerCallbackQuery({callback_query_id:String(cb.id)})}catch(_){}39  }catch(e){40    if(cb)try{await Api.answerCallbackQuery({callback_query_id:String(cb.id),text:"⚠️ Could not open the key screen.",show_alert:true})}catch(_){}41  }42})();