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
ProfileTelegram
132 commands0 envUpdated 7h agoCreated Sep 4, 2026
Back to folder

commands/_set_how_link_btn.js

javascript · 60 lines

Raw
1/**#command2name: /set_how_link_btn3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 📹 ADMIN PANEL BUTTON — "Set How To Use Link"14// Pressing this button prompts the admin to send the new video/tutorial15// link as a normal text message next; _start.js (MODULE 5) auto-captures16// that reply and forwards it to /set_how_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("how_to_use_link") || "https://youtu.be/oe2Ja08Vvpo (default)";30 31  User.setProperty("set_how_link_step", "waiting_input", "string");32 33  var promptText =34    "<blockquote><tg-emoji emoji-id='5258077307985207053'>📹</tg-emoji> <b>Set 'How To Use' Video Link</b></blockquote>\n\n" +35    "<i>Naya link (http/https) bhejein jo 'Watch Video Guide' button pe khulega.</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}