The following changes were made by the replace_file_content tool to: /root/aadharbot/index.js. If relevant, proactively run terminal commands to execute this code for the USER. Don't ask for permission. [diff_block_start] @@ -1221,23 +1221,10 @@ return ctx.reply(responseText, { parse_mode: 'HTML', ...keyboard }); } - // Access check (Credits or Subscription) - const access = await checkUserAccess(userId); - let hasAccess = false; - let freeUsedToday = 0; - - if (access.isUnlimited) { - hasAccess = true; - } else { - freeUsedToday = await getDailyFreeNumSearches(userId); - if (freeUsedToday < 2) { - hasAccess = true; - } else if (access.credits >= 1) { - hasAccess = true; - } - } - - if (!hasAccess) { + // Access check (Credits or Subscription or Daily Free Search) + const access = await checkUserAccess(userId); + + if (!access.hasAccess) { const unauthorizedMsg = `🛡️ ${toMono("AADHAAR PREMIUM SERVICES")}\n` + `━━━━━━━━━━━━━━━━━━━━━━━━━━\n` + `👤 Session Info:\n` + @@ -1244,8 +1244,9 @@ `• ID: ${userId}\n` + - `• Balance: ${access.credits} Credits ${CREDIT_EMOJI}\n\n` + - `
⚠️ Access Limit / Limit Restricted:\n` + - `Aapke paas active credits nahi hain aur aapke daily 2 free searches khatam ho chuke hain. Aage search karne ke liye credits khareedein (Cost: 1 Credit ${CREDIT_EMOJI} per search).\n\n` + - `(You do not have enough balance and your 2 daily free searches are exhausted. Please add funds or a subscription plan to proceed.)
\n` + + `• Balance: ${access.credits} Credits ${CREDIT_EMOJI}\n` + + `• Daily Free Search: Used Today (Resets 12:00 AM IST) ⏳\n\n` + + `
⚠️ Access Limit / Limit Restricted:\n` + + `Aapka aaj ka 1 Daily Free Search use ho chuka hai aur aapke paas credits nahi hain. Aage search karne ke liye credits khareedein (Cost: 1 Credit ${CREDIT_EMOJI} per search = ₹60).\n\n` + + `(Daily free search exhausted. Please add funds to proceed.)
\n` + `━━━━━━━━━━━━━━━━━━━━━━━━━━`; return ctx.reply(unauthorizedMsg, { [diff_block_end] Please note that the above snippet only shows the MODIFIED lines from the last change. It shows up to 3 lines of unchanged lines before and after the modified lines. The actual file contents may have many more lines not shown.