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/_bot_maintenance_toggle.js
javascript · 70 lines
1/**#command2name: /bot_maintenance_toggle3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12var __swfUpdate = (typeof update !== "undefined" && update) ? update : null;13var __swfCb = (__swfUpdate && __swfUpdate.callback_query) ? __swfUpdate.callback_query : null;14var __swfCbMsg = (__swfCb && __swfCb.message) ? __swfCb.message : null;15var __swfMsgId = __swfCbMsg && __swfCbMsg.message_id ? Number(__swfCbMsg.message_id) : 0;16var __swfCbId = __swfCb && __swfCb.id ? String(__swfCb.id) : "";17try {18 if (typeof request !== "undefined" && request && __swfCb) {19 if (__swfCb.message) request.message = __swfCb.message;20 if (!request.id && __swfCb.id) request.id = __swfCb.id;21 }22} catch(__swf_norm_err) {}23function __swfEditMessage(a) {24 a = a || {};25 var mid = Number(a.message_id || __swfMsgId || 0);26 var cid = a.chat_id || (typeof chat !== "undefined" && chat ? (chat.id || chat.chatid) : null);27 if (!mid || !cid) throw new Error("Callback message ID not found");28 var markup = a.reply_markup;29 if (typeof markup === "string") { try { markup = JSON.parse(markup); } catch(_) {} }30 var base = {chat_id:cid,message_id:mid,parse_mode:a.parse_mode,reply_markup:markup};31 var cm = __swfCbMsg;32 if (cm && (cm.photo || cm.video || cm.document || cm.audio || cm.animation)) {33 return Api.editMessageCaption({chat_id:cid,message_id:mid,caption:String(a.text == null ? "" : a.text),parse_mode:a.parse_mode,reply_markup:markup});34 }35 return Api.editMessageText({chat_id:cid,message_id:mid,text:String(a.text == null ? "" : a.text),parse_mode:a.parse_mode,reply_markup:markup});36}37try {38 var uid = String(user.telegramid);39 var owner = String(Bot.getProperty("owner_id") || "8225479428");40 if (uid !== owner && !Bot.getProperty("co_admin_" + uid)) {41 try { Api.answerCallbackQuery({callback_query_id:String(__swfCbId || (request && request.id) || ""),text:"❌ Administrator only.",show_alert:true}); } catch(e0) {}42 return;43 }44 var current = Bot.getProperty("bot_maintenance_mode") === true;45 var next = !current;46 Bot.setProperty("bot_maintenance_mode", next, "boolean");47 try {48 Api.answerCallbackQuery({49 callback_query_id: String(__swfCbId || (request && request.id) || ""),50 text: next ? "🔴 Maintenance mode turned ON" : "🟢 Maintenance mode turned OFF"51 });52 } catch (e1) {}53 try {54 Bot.run({command:"/bot_security"});55 } catch (runErr) {56 try { Bot.runCommand("/bot_security"); } catch (runErr2) {57 var chatId = (typeof chat !== "undefined" && chat) ? chat.chatid : null;58 var mid = __swfMsgId || (request && request.message && request.message.message_id ? Number(request.message.message_id) : 0);59 var statusText = next60 ? "🔴 <b>Bot maintenance mode is now ON.</b>\n\nUsers will see a maintenance message instead of the verification/menu screen."61 : "🟢 <b>Bot maintenance mode is now OFF.</b>\n\nThe bot is back to normal for everyone.";62 var backKb = JSON.stringify({inline_keyboard:[[{text:"🔙 Settings",callback_data:"/bot_security"}]]});63 if (mid && chatId) {64 try { __swfEditMessage({chat_id:chatId,message_id:mid,text:statusText,parse_mode:"HTML",reply_markup:backKb}); } catch (e2) {}65 }66 }67 }68} catch (err) {69 try { Api.answerCallbackQuery({callback_query_id:String(__swfCbId || (request && request.id) || ""),text:"⚠️ Could not toggle maintenance mode.",show_alert:true}); } catch (e3) {}70}