amanjha18v/AMAN_SHOPS_BOTPublic · Bot Template
AIAMAN SHOP STORE appears to be a Telegram automation bot. Commands include /*, /addbal, /addbal_all, /addbal_binance, /addbal_binance_approve, /addbal_binance_paid, /addbal_upi, /addcat_id. Observed in code: messaging, http, libs, keyboards, payments.
Utilityutility
132 commands0 envUpdated 7h agoCreated Sep 4, 2026
commands/_set_download_link_btn.js
javascript · 60 lines
1/**#command2name: /set_download_link_btn3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 🔗 ADMIN PANEL BUTTON — "Set Download Link"14// Pressing this button prompts the admin to just send the link as15// a normal text message next; _start.js (MODULE 5) auto-captures16// that reply and forwards it to /set_update_link internally.17// =========================================================18 19try {20 var adminId = Bot.getProperty("owner_id") || "5191323229";21 var currentChatId = String(chat.chatid);22 var isCoAdmin = Bot.getProperty("co_admin_" + currentChatId);23 24 if (currentChatId !== adminId && !isCoAdmin) {25 Bot.sendMessage("❌ You are not authorized to use this.");26 return;27 }28 29 var currentLink = Bot.getProperty("update_channel_link") || "Not set";30 31 User.setProperty("set_download_link_step", "waiting_input", "string");32 33 var promptText =34 "<blockquote><tg-emoji emoji-id='6080214566191505147'>🔗</tg-emoji> <b>Set Download Files Link</b></blockquote>\n\n" +35 "<i>Send the link (http/https) you want the \"Download Files\" button to open. It will be sent as the next message.</i>\n\n" +36 "<b>Current link:</b> " + currentLink;37 38 var queryId = request ? (request.id || (request.callback_query && request.callback_query.id)) : null;39 40 if (request && request.message && request.message.message_id) {41 try {42 Api.editMessageText({43 chat_id: String(chat.chatid),44 message_id: Number(request.message.message_id),45 text: promptText,46 parse_mode: "HTML",47 reply_markup: JSON.stringify({ inline_keyboard: [[{ text: "Cancel", callback_data: "/admin", style: "danger" }]] })48 });49 } catch (e) {50 Api.sendMessage({ chat_id: chat.chatid, text: promptText, parse_mode: "HTML" });51 }52 } else {53 Bot.sendMessage(promptText, { parse_mode: "HTML" });54 }55 56 if (queryId) { try { Api.answerCallbackQuery({ callback_query_id: String(queryId) }); } catch (e) {} }57 58} catch (err) {59 Bot.sendMessage("⚠️ Error: " + err.message);60}