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

javascript · 50 lines

Raw
1/**#command2name: /productmaintenance_toggle3answer: 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}38try{39 var uid=String(user.telegramid),owner=String(Bot.getProperty("owner_id")||"8225479428");if(uid!==owner&&!Bot.getProperty("co_admin_"+uid))return;40 var i=Number(String(params||"").trim()),products=Bot.getProperty("stored_products")||[],p=products[i];if(!p)return;41 var map=Bot.getProperty("product_maintenance")||{}; if(map && typeof map === "object") map=Object.assign({}, map); var key=String(i);map[key]=!map[key];Bot.setProperty("product_maintenance",map,"json");42 var selectedName=String(p.name||("Product "+i));43 var selectedText=map[key]44   ? "🔧 <b>"+selectedName.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")+" is now in maintenance mode.</b>"45   : "✅ <b>"+selectedName.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")+" has been taken out of maintenance mode.</b>";46 try{Api.answerCallbackQuery({callback_query_id:String(__swfCbId || request.id),text:map[key]?"🔧 Product switched to maintenance mode":"✅ Maintenance mode turned off"});}catch(e){}47 var buttons=[[{text:"🔧 Maintenance Mode",callback_data:"/productmaintenance"}],[{text:"🔙 Admin Panel",callback_data:"/admin"}]];48 var req2=(typeof request!=="undefined"&&request)?request:null,mid2=req2&&req2.message&&req2.message.message_id?Number(req2.message.message_id):(__swfMsgId||0);49 if(mid2){try{__swfEditMessage({chat_id:chat.chatid,message_id:mid2,text:selectedText,parse_mode:"HTML",reply_markup:JSON.stringify({inline_keyboard:buttons})});}catch(er){try{Api.answerCallbackQuery({callback_query_id:String(__swfCbId || request.id),text:"⚠️ Could not update the screen.",show_alert:true});}catch(ea){}}}50}catch(e){}