indrajitghosh20006/Testseller_01botPublic · Bot Template

ProfileTelegram

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
Back to folder

commands/_set_dailygift_price.js

javascript · 50 lines

Raw
1/**#command2name: /set_dailygift_price3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 🔧 ADMIN — Configure the /dailygift fixed reward amount14// Usage: /set_dailygift_price 515// =========================================================16 17try {18  var adminId = Bot.getProperty("owner_id") || "7839151435";19  var isCoAdmin0 = Bot.getProperty("co_admin_" + String(chat.chatid));20  if (String(chat.chatid) !== adminId && !isCoAdmin0) {21    Bot.sendMessage("❌ You are not the admin!");22    return;23  }24 25  if (!params || params.trim() === "") {26    var currentAmount = Bot.getProperty("daily_gift_amount");27    if (currentAmount === undefined || currentAmount === null) currentAmount = "1 (default)";28    Bot.sendMessage(29      "⚠️ <b>Format:</b> <code>/set_dailygift_price 5</code>\n\n" +30      "<b>Current amount:</b> ₹<code>" + currentAmount + "</code>",31      { parse_mode: "HTML" }32    );33    return;34  }35 36  var newAmount = Number(params.trim());37  if (isNaN(newAmount) || newAmount <= 0) {38    Bot.sendMessage("❌ Invalid amount! Sirf positive number bhejein, jaise: <code>5</code>", { parse_mode: "HTML" });39    return;40  }41 42  Bot.setProperty("daily_gift_amount", newAmount, "number");43  Bot.sendMessage(44    "✅ <b>Lucky Spin amount update ho gaya:</b> ₹" + newAmount.toFixed(2) + "\n\n<i>Ab har user ko is naye amount ka Lucky Spin milega.</i>",45    { parse_mode: "HTML" }46  );47 48} catch (err) {49  Bot.sendMessage("⚠️ Error: " + err.message);50}