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_dailygift_price_btn.js

javascript · 61 lines

Raw
1/**#command2name: /set_dailygift_price_btn3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 🎁 ADMIN PANEL BUTTON — "Set Daily Gift Price"14// Pressing this button prompts the admin to send the new amount as a15// normal text message next; _start.js (MODULE 5) auto-captures that16// reply and forwards it to /set_dailygift_price 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 currentAmount = Bot.getProperty("daily_gift_amount");30  if (currentAmount === undefined || currentAmount === null) currentAmount = "1 (default)";31 32  User.setProperty("set_dailygift_price_step", "waiting_input", "string");33 34  var promptText =35    "<blockquote><tg-emoji emoji-id='6194922667242429131'>🎁</tg-emoji> <b>Set Daily Gift Amount</b></blockquote>\n\n" +36    "<i>Naya amount bhejein (₹) jo har user ko 24 ghante me ek baar Daily Gift me milega.</i>\n\n" +37    "<b>Current amount:</b> ₹<code>" + currentAmount + "</code>";38 39  var queryId = request ? (request.id || (request.callback_query && request.callback_query.id)) : null;40 41  if (request && request.message && request.message.message_id) {42    try {43      Api.editMessageText({44        chat_id: String(chat.chatid),45        message_id: Number(request.message.message_id),46        text: promptText,47        parse_mode: "HTML",48        reply_markup: JSON.stringify({ inline_keyboard: [[{ text: "Cancel", callback_data: "/admin", style: "danger" }]] })49      });50    } catch (e) {51      Api.sendMessage({ chat_id: chat.chatid, text: promptText, parse_mode: "HTML" });52    }53  } else {54    Bot.sendMessage(promptText, { parse_mode: "HTML" });55  }56 57  if (queryId) { try { Api.answerCallbackQuery({ callback_query_id: String(queryId) }); } catch (e) {} }58 59} catch (err) {60  Bot.sendMessage("⚠️ Error: " + err.message);61}