indrajitghosh20006/Testseller_01botPublic · Bot Template
AIThis bot provides an admin‑controlled system for managing user balances, products, and reseller roles. It includes commands to add balances (via manual input, Binance Pay, or UPI), approve and credit payments, and set up product listings with categories and pricing. Admins can also add resellers, view reseller info, and manage stock entries. The bot uses built‑in TeleBotHost APIs such as Bot, Api, HTTP, and Libs for database operations and message handling.
Commerceadminbalanceproductresellerpaymentsbinance
138 commands0 envUpdated 17h agoCreated Sep 27, 2026
commands/_set_dailygift_price_btn.js
javascript · 61 lines
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 Lucky Spin 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") || "7839151435";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 Lucky Spin Amount</b></blockquote>\n\n" +36 "<i>Naya amount bhejein (₹) jo har user ko 24 ghante me ek baar Lucky Spin 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}