indrajitghosh20006/HgfhhuybotPublic · Bot Template

ProfileTelegram

AIThis bot provides a command‑based admin interface for managing user balances, products, and resellers. It supports adding balances via UPI or Binance Pay, approving payments, and configuring product details and categories. The bot also handles user role changes, stock uploads, and offers a simple calculator UI for entering amounts. All interactions are handled through short commands and inline keyboards, with no long‑running listeners or external frameworks.

Utilityadminbalanceproductresellerpaymentupi
138 commands0 envUpdated 15h 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}