yaainnnxitstore/YASIN_XIT_BOTPublic · Bot Template
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
commands/_addplan_duration.js
javascript · 23 lines
1/**#command2name: /addplan_duration3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12var __u=(typeof update!=="undefined"&&update)?update:null;var __cb=(__u&&__u.callback_query)?__u.callback_query:null;var __msg=(__cb&&__cb.message)?__cb.message:null;var __mid=__msg&&__msg.message_id?Number(__msg.message_id):0;13function __edit(t,m){var cid=chat&&chat.chatid,mk=typeof m==="string"?m:JSON.stringify(m||{});if(__mid){try{return Api.editMessageText({chat_id:cid,message_id:__mid,text:t,parse_mode:"HTML",reply_markup:mk});}catch(e){try{return Api.editMessageCaption({chat_id:cid,message_id:__mid,caption:t,parse_mode:"HTML",reply_markup:mk});}catch(e2){}}}return Api.sendMessage({chat_id:cid,text:t,parse_mode:"HTML",reply_markup:mk});}14try{15 var owner=String(Bot.getProperty("owner_id")||"8225479428"),uid=String(user.telegramid);if(uid!==owner&&!Bot.getProperty("co_admin_"+uid)){__edit("❌ You are not authorized.",{});return;}16 var a=String(params||"").trim().split(/\s+/),idx=Number(a[0]),n=Number(a[1]),unit=String(a[2]||"");17 var allowedH={1:1,2:1,3:1,5:1,6:1,9:1},allowedD={1:1,2:1,3:1,5:1,7:1,10:1,15:1,20:1,30:1,60:1};18 if((unit!=="hour"||!allowedH[n])&&(unit!=="day"||!allowedD[n])){__edit("❌ Invalid plan duration.",{inline_keyboard:[[{text:"🔙 Select Duration",callback_data:"/addplan_product "+idx}]]});return;}19 var ps=Bot.getProperty("stored_products")||[];if(!Array.isArray(ps)||!ps[idx]){__edit("❌ Product not found.",{inline_keyboard:[[{text:"🔙 Add Plan",callback_data:"/addplan_menu"}]]});return;}20 var disp=unit==="hour"?n+" Hours":n+" Days";21 User.setProperty("quick_plan_state",JSON.stringify({step:"price",product_index:idx,days:String(n),unit:unit,durationDisplay:disp}),"string");22 __edit("📦 <b>"+String(ps[idx].name)+"</b>\n🗓️ <b>"+disp+"</b>\n\n💰 Send the price of this plan in USD.\n\nExample: <code>100</code>",{inline_keyboard:[[{text:"🔙 Select Duration",callback_data:"/addplan_product "+idx}]]});23}catch(e){__edit("❌ Could not select the plan duration: "+String(e&&e.message||e),{});}